i = int(input()) N = [int(input()) for _ in range(i)] for n in N: if n % 40 == 0: print("ikisugi") elif n % 8 == 0: print("iki") elif n % 10 == 0: print("sugi") else: print(n // 3)