x=int(input()) lst = [int(input()) for _ in range(x)] for i in range(x):print("ikisugi" if lst[i]%40 ==0 else "sugi" if lst[i]%10 ==0 else "iki" if lst[i]%8 ==0 else lst[i]//3)