i = int(input()) N = list(map(int, [input() for i in range(i)])) for i in range(i): if N[i] % 8 == 0: if N[i] % 10 == 0: print('ikisugi') else: print('iki') elif N[i] % 10 == 0: print('sugi') else: print(N[i]//3)