import kotlin.random.Random

//

fun main() {
    intro_heuristicsa()
}

fun intro_heuristicsa() {
    val d = readLine()!!.toInt()
    val c = readLine()!!.split(" ").map { it.toInt() }
    val s = MutableList(d) { listOf<Int>() }
    repeat(d) {
        s[it] = readLine()!!.split(" ").map { it.toInt() }
    }
    val nextContest = (1..26).toMutableList()
    nextContest.shuffle()
    val last = IntArray(26) { 0 }
    repeat(d) {
        val scores = s[it].mapIndexed { index, i -> index to i }
        val day = it + 1
        val disapoint = last.mapIndexed { index, i -> (it - i + 1) * c[index] }.sum()
        val max_score = scores.maxBy { (index, value) -> value + (c[index] * (day - last[index])) - disapoint }!!
        println(max_score.first + 1)
        last[max_score.first] = day
    }
}
