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