cnt = int(input()) for i in range(cnt): num = int(input()) printStr = '' if num % 8 == 0: printStr += 'iki' if num % 10 == 0: printStr += 'sugi' if not printStr: print(int(num / 3)) else: print(printStr)