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