N = int(input().strip()) lst = [] for i in range(N): tmp = '' n = int(input().strip()) if n % 8 == 0: tmp += 'iki' if n % 10 == 0: tmp += 'sugi' if len(tmp) == 0: tmp = str(int(n / 3)) lst.append(tmp) for i in lst: print(i)