import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) throws Exception { new Main().run(); } void run() { Scanner sc=new Scanner(System.in); int Q=sc.nextInt(); int[] T=new int[(int)1e6+10]; T[4]=1; for(int i=5;i