t=int(input())for i in range(1,t+1): n=int(input()) if n%400==0 or n%4==0 and n%100!=0:print(f"Case {i}: a leap year") else:print(f"Case {i}: a normal year")