#include <iostream>
#include <string>
#include <map>
#include <vector>

using namespace std;

int main()
{
map<string,short> mHaabMonthMap;
string strTempArray[19] = {
"pop","no", "zip", "zotz",
"tzec", "xul", "yoxkin",
"mol", "chen", "yax", "zac",
"ceh", "mac", "kankin", "muan",
"pax", "koyab", "cumhu","uayet" };
int i = 0;
for( i = 0; i < 19; ++i )
{
mHaabMonthMap[strTempArray[i]] = i;
}

string strHollyDay[20] = {
"imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk",
"ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau" };
int nYear = 0;
float fDay = 0.0;
int nDayName = 0;
string strMonth;
int nCase = 0;
vector<int> nResultVec;
cin >> nCase;
for( i = 0; i < nCase; ++i )
{
cin >> fDay >> strMonth >> nYear;
nResultVec.push_back( 365*nYear + 20*mHaabMonthMap[strMonth] + fDay );
}

cout << nCase << endl;
for( i = 0; i < nResultVec.size(); ++i )
{
nYear = nResultVec[i] / ( 13 * 20 );
fDay = nResultVec[i] % 13 + 1;
nDayName = nResultVec[i] % 20;
cout << (int)fDay << " " << strHollyDay[nDayName] << " " << nYear << endl;
}

return 0;

}



作者:山丘儿