for i in range(int(input())): val = int(input()) res = '' if val % 8 == 0: res += 'iki' if val % 10 == 0: res += 'sugi' if len(res) == 0: print(val // 3) else: print(res)