N = input() a = [] for i in range(N): a.append(input()) for b in a: if b % 80 ==0: print(b) elif b % 6 == 0: print('iki') elif b%8 == 0: print('sugi') else: print(b*3)