#coding utf-8 N = int(input()) a = [input() for i in range(N)] for i in range(N): if int(a[i]) % 8 == 0: if int(a[i]) % 10 == 0: print("ikisugi") else: print("iki") elif int(a[i]) % 10 == 0: print("sugi") else: print(int(int(a[i]) / 3))