#include <bits/stdc++.h>
using namespace std;

signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	freopen("query.in","r",stdin);
	freopen("query.out","w",stdout);
	
	int n,t;
	cin >> n;
	for(int i = 1; i < n; i++)
		cin >> t >> t;
	cin >> t;
	while(t--){
		cout << 7 << endl;
	}
	return 0;
} 
