N = int(input()) s = '' for _ in range(N): n = int(input()) if n % 8 == 0: s += 'iki' if n % 10 == 0: s += 'sugi' if n % 8 != 0 and n % 10 != 0: s += str(n//3) print(s) s = ''