import java.util.Scanner; public class Main { public static void main(String[] args) { long dp[] = new long[1000001]; dp[4] = 1; for(int i=5; i<1000001; i++) { dp[i] = (dp[i-1] + dp[i-2] + dp[i-3] + dp[i-4]) % 17; } try (Scanner scan = new Scanner(System.in)) { int q = scan.nextInt(); for(int i=0; i