#include <stdio.h>
#include <string.h>
int main()
{
int n,a,b,c,i;
char s[10];
char y[25][10]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu"};
char u[25][20]={"imix","ik","akbal","kan","chicchan","cimi","manik","lamat","muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab","canac","ahau"};
scanf("%d",&n);
printf("%d\n",n);
while(n--)
{
scanf("%d. %s %d",&a,s,&c);
{
a++;
c*=365;
for(i=0;i<18;i++)
{
if(strcmp(y[i],s)==0)
{
b=i;
break;
}
}
a=20*b+a+c;
}
{
c=(a-1)/260;
a=a%260;
b=a%20;
if(b==0) b=20;
b--;
a=a%13;
if(a==0) a=13;
printf("%d %s %d\n",a,u[b],c);
}
}
return 0;
}
过了