#define DEBUG

#include <iostream>
#include<fstream>

#include <bits/stdc++.h>
#include <time.h>
#include <sys/timeb.h>
#include <cstdio>
#include <sys/time.h>

using namespace std;
#define ll long long
#define uint unsigned int
#define ulong unsigned long long int
#define Vec vector
#define V2 vector<vector<int>>


class Xor128{
	private:
	uint x, y, z, w;
	public:
	void init(uint seed = 0){
		x = 123456789;
		y = 362436069;
		z = 521288629;
		w = 88675123;
		z ^= seed;
	}
	Xor128(){init();}
	Xor128(uint seed){init(seed);}
	uint Next(){
		uint t = x ^ (x << 11);
		x = y; y = z; z = w;
		return w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
	}
	int Next(int ul){
		return ul == 0 ? 0 : NextI(0,ul-1);
	}
	int NextI(int from,int to){
		int mod=to-from+1;
		int ret=(int)(Next()%mod);
		return ret+from;
	}
	
	double NextD(){
		return (Next() & 1048575) / 1048575.0;
	}
};


class Timer{
public:
	Timer(){
		cycle_per_sec = (ulong) 2.7e9; 
	}
	void Start(){
		begin_cycle = getCycle();
	}
	double getTime(){
		return (double)(getCycle() - begin_cycle) / cycle_per_sec;
	}
	int elapsedMilliseconds(){
		return (int)( 1000 * getTime() );
	}

	ulong getCycle(){
		uint low, high;
		__asm__ volatile ("rdtsc" : "=a" (low), "=d" (high));
		return ((ulong) low) | ((ulong) high << 32);
	}
private:
	ulong begin_cycle;
	ulong cycle_per_sec;
};

Timer T;
ll Now(){return (ll) T.elapsedMilliseconds();}

const double Eps = 1e-9;
inline bool InRange(int t, int l, int r){ return l <= t && t < r;}
void Swap(int &a, int &b){ int t = a; a = b; b = t;}

// SA template

Xor128 lottery(25252525);
const double Csa = 2426;
//double C = 1200;

bool SAgain(double score, double prev, long now, long start, long limitDuration){
	if( score > prev ) return true;
	double ratio = - (prev - score) / prev;
	double remainingTime = (now - start) / (double) limitDuration;
	if( remainingTime > 1.0) return false;
	remainingTime = 1 - remainingTime;

	double acProb = exp(Csa * ratio / remainingTime);

	return (lottery.NextD() + Eps) < acProb ;
}
bool MCgain(double score, double prev, long now, long start, long limitDuration){
	if( score < prev ) return true;
	return false;
}

template<typename T> bool InRange(T t, T l, T r){ return l <= t && t < r; }
const int Inf = (int) 1e9;

int D;
Vec<int> C;
V2 S;





void OutputAns(Vec<int>& a){
	for(int i=0;i<D;i++){
		printf("%d\n", a[i] + 1);
	}
}

int calcNaive(Vec<int>& a){
	Vec<int> last(26);
	for(int i=0;i<26;i++) last[i] = -1;
	int ret = 0;
	for(int i=0;i<D;i++){
		ret += S[i][a[i]];
		last[a[i]] = i;
		for(int j=0;j<26;j++){
			ret -= C[j] * (i - last[j]);
		}
	}
	return ret;
}
int calcLine(Vec<int>& a){
	Vec<int> last(26);
	for(int i=0;i<26;i++) last[i] = -1;
	int ret = 0;
	for(int i=0;i<D;i++){
		ret += S[i][a[i]];
		int d = (i - last[a[i]]) - 1;
		ret -= d * (d + 1) / 2 * C[a[i]];
		last[a[i]] = i;
	}
	
	for(int i=0;i<26;i++){
		int d = (D - last[i]) - 1;
		ret -= d * (d + 1) / 2 * C[i];
	}
	return ret;
}

void debug1(){
	Vec<int> a{1, 17,13,14,13};
	for(int i=0;i<a.size();i++) a[i]--;
	cerr << calcNaive(a) << endl;
	cerr << calcLine(a) << endl;
	
}

void MC(){
	
	Xor128 rnd(2525);
	Vec<int> a(D);
	for(int i=0;i<D;i++) a[i] = rnd.Next(26);
	int sc = calcLine(a);
	
	OutputAns(a);
	
	
	
}









void Solve(){
	//debug1();
	MC();

}


int main(int argc, char* argv[] ){
	//C = stod(argv[1]);
	T.Start();
	cin >> D;
	C.resize(26);
	for(int i=0;i<26;i++) cin >> C[i];
	S.resize(D);
	for(int i=0;i<D;i++) S[i].resize(26);
	for(int i=0;i<D;i++){
		for(int j=0;j<26;j++){
			cin >> S[i][j];
		}
	}

	Solve();
	
/*	for(int i=0;i<md.size();i++){
		cerr << "sc: " << md[i] << " at: " << msc[i] << endl;
	}
*/
/*
	ofstream fout("score.csv");
	fout << "C,score" << endl;
	fout << C << "," << maxSc << endl;
	fout.close();
*/
	return 0;
}

Measured memory_bytes: 3740