import java.util.Scanner;
public class LeapYearChecker {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
for (int i = 1; i <= t; i++) {
int y = scanner.nextInt();
if ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0)) {
System.out.println("a leap year");
} else {
System.out.println("a normal year");
}
}
scanner.close();
}
}