from calendar import* exec"i=input();print i,month_name[i];"*input()