i = input() N = [] for j in range(0,i): N.append(input()) for k in range(0,i): if N[k]%8 == 0 and N[k]%10 == 0: print 'ikisugi' elif N[k]%8 == 0: print 'iki' elif N[k]%10 == 0: print 'sugi' elif N[k]%3 == 0: print N[k]/3 else: pass