N = int(input()) A = [int(input()) for i in range(N)] for a in A: if a % 8 != 0 and a % 10 != 0: print(a // 3) else: if a % 8 == 0: print("iki", end = "") if a % 10 == 0: print("sugi", end = "") print("")