#!/usr/bin/env python n = int(input()) inval = [] for i in range(n): inval.append(int(input().strip())) for n in inval: ans = str() if n % 8 == 0: ans = ans + 'iki' if n % 10 == 0: ans = ans + 'sugi' if len(ans) == 0: ans = n//3 print(ans)