import java.util.Scanner;; public class No661 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int i = s.nextInt(); int[] N = new int[i]; for(int k = 0;k < i;k++){ N[k] = s.nextInt(); } s.close(); for(int k : N){ if(k % 8 == 0 && k % 10 == 0){ System.out.println("ikisugi"); }else if(k % 8 == 0){ System.out.println("iki"); }else if(k % 10 == 0){ System.out.println("sugi"); }else{ System.out.println(k / 3); } } } }