i = int(input()) N = [int(input()) for _ in range(i)] for n in N: m = '' if n%8 < 1: m += 'iki' if n%10 < 1: m += 'sugi' print(m if m != '' else n//3)