N=int(input()) ls=[] for i in range(N): ls.append(int(input())) for i in range(N): if ls[i]%8==0 and ls[i]%10==0: print("ikisugi") elif ls[i]%10==0: print("sugi") elif ls[i]%8==0: print("iki") else: print(ls[i]//3)