for x in [int(input()) for i in range(int(input()))]: res="" if x%8==0: res+="iki" if x%10==0: res+="sugi" if len(res)==0: res=str(int(x/3)) print(res)