var toInt = x=>parseInt(x,10);
var toIntArr = arr=>arr.map(x=>toInt(x));
var abs = x=>x>0?x:-x;
function min(){var rest = arguments,val=rest[0];for(var i=1;i<rest.length;i++)if(rest[i]<val)val = rest[i];return val}
function max(){var rest = arguments,val=rest[0];for(var i=1;i<rest.length;i++)if(rest[i]>val)val = rest[i];return val}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
 
function Main(input){
	var input = input.split('\n');
	input = input.map(e => toIntArr(e.split(' ')));
	var d = input[0][0];
	var cs = input[1];
	var ss = input.slice(2);
	//var ts = input.slice(d+2).map(e=>e[0]);
	
	var score = 0;
	var ans = [];
	let type;
	var lastday = [];
	lastday.length = 26;
	lastday.fill(-1);

	//let scoreDay = [];

	//day(0~25)にtype(1~26)を選んだ場合の満足度の変化(lastdayのdayは0~)
	function getScore(day,type){
		let ans = 0;
		ans += ss[day][type-1];
		for(let t = 0; t < 26; t++){
			if(t!==type-1) ans -= cs[t] * (day - lastday[t]);
		}
		return ans;
	}

	var tempScore = [];
	let maxType = 1;
	for(let i = 0; i < d; i++){
	tempScore.fill(0);

		for(j = 0; j < 26; j++){
			tempScore[j] = getScore(i,j+1);
		}
		maxType = tempScore.indexOf(Math.max(...tempScore)) +1; //0~25 +1


		type = maxType;
		ans.push(type);
		lastday[type-1] = i;

		score += tempScore[type];

		//scoreDay[i] = score;

	}

	console.log(ans.join('\n'));
}