#53753: 232111111122112


s410282@student.cysh.cy.edu.tw (黃振宇)


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