#include <bits/stdc++.h>

int ri() {
	int n;
	scanf("%d", &n);
	return n;
}

int main() {
	int n = ri();
	int c[n];
	for (auto &i : c) i = ri();
	int a[n][26];
	for (auto &i : a) for (auto &j : i) j = ri();
	
	for (int i = 0; i < n; i++) {
		printf("%d\n", i % 26 + 1);
	}
	
	return 0;
}
