n = int(input()) for _ in range(n): x = int(input()) if x % 40 == 0: print('ikisugi') elif x % 10 == 0: print('sugi') elif x % 8 == 0: print('iki') else: print(x // 3)