#include<bits/stdc++.h>
using namespace std;
int n,a,b; 
int main(){
	freopen("query.in","r",stdin);
	freopen("query.out","w",stdout);
	scanf("%d",&n);
	for(int i=1;i<=n;++i) scanf("%d%d",&a,&b);
	scanf("%d",&n); ++n;
	while(--n){
		printf("1\n");
	}
	return 0;
} 
