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