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