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