N = int(input()) for i in range(N) : a = int(input()) if (a % 8 == 0) and (a % 10 == 0) : ans = "ikisugi" elif a % 8 == 0 : ans = "sugi" elif a % 10 == 0 : ans = "iki" else : ans = a//3 print(ans)