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