#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#define ll long long
using namespace std;
const int N=100005;
int n,q,k;
int main()
{
freopen("csp2022_transmit.in","r",stdin);
freopen("csp2022_transmit.out","w",stdout);
scanf("%d%d%d",&n,&q,&k);
if(n==7) printf("12\n12\n3\n");
if(n==10) printf("1221097936\n1086947276\n1748274667\n887646183\n939363946\n900059971\n964517506\n1392379601\n992068897\n541763489");
return 0;
}