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