def solve(w): s="" if w%8==0: s="iki" if w%10==0: s+="sugi" if s:return s return w//3 n=int(input()) for _ in range(n): w=int(input()) print(solve(w))