L=[] for i in range(int(input())):L.append(int(input())) for A in L: O='' if A%8==0:O='iki' if A%10==0:O+='sugi' if O=='':O=str(A//3) print(O)