import java.lang.Math.*

private fun readLn() = readLine()!! // string line
private fun readStrings() = readLn().split(" ") // list of strings
private fun readLong() = readLn().toLong()
private fun readLongs() = readStrings().map { it.toLong() } // list of ints
private fun readInt() = readLn().toInt() // single int
private fun readInts() = readStrings().map { it.toInt() } // list of ints


//var n = 0
//var ar = listOf<Int>()

fun main() {
    val d = readInt()
    val C = readInts()
    var S = mutableListOf<List<Int>>()
    S.add(mutableListOf())

    for (i in 0 until d) {
        S.add(readInts())
    }

    val last = Array(26) {0}
    val chosen = mutableListOf<Int>()

    for (day in 1 until d + 1) {
        var max = Integer.MIN_VALUE
        var maxContest = -1

        for (contest in 0 until 26) {
            var cur = S[day][contest]
            val daysSince = day - last[contest]
            cur -= (C[contest] * daysSince * (daysSince + 1) / 2)

            if (cur > max) {
                max = cur
                maxContest = contest
            }
        }

        chosen.add(maxContest + 1)
    }

    print(chosen.joinToString("\n"))
}
