n=int(input()) for i in range(n): q="" s=int(input()) if s%8==0: q="iki" if s%10==0: q+="sugi" elif s%3==0 and q=="": print(s//3) continue print(q)