#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int leap(int y){
if(y%4==0&&y%100!=0)
return 1;
if(y%400==0)
return 1;
else
return 0;
}
int main(int argc, char *argv[]) {
int n,m,i;
int year,month,day;
while(scnaf("%d",&n)!=EOF)
{
for(i=0;i<n;i++)
{
scanf("%d%d%d",&year,&month,&day);
if(leap(year)==1)
{
switch(month)
{
case 1:printf)
}
}
}
}
return 0;
}