n = int(input()) kity = { (True, True) : 'ikisugi', (True, False) : 'iki', (False, True) : 'sugi' } for _ in range(n): apple = int(input()) print(kity.get((apple%8==0, apple%10==0), apple//3))