import java.util.*

fun main(args: Array<String>) {
    val pw = java.io.PrintWriter(System.out)
    Problem.solve(Scanner(System.`in`), pw)
    pw.flush()
}

object Problem {
    lateinit var calcScore: (ans: List<Int>) -> Long

    fun solve(sc: Scanner, pw: java.io.PrintWriter) {
        val D = sc.next().toInt()
        val c = IntArray(26) { sc.next().toInt() }
        val s = Array(D) { IntArray(26) { sc.next().toInt() } }

        calcScore = { t ->
            val d = IntArray(26) { -1 }// 最後におこなった日
            var score = 0L
            for (i in t.indices) {
                score += s[i][t[i]]
                d[t[i]] = i
                for (j in 0 until 26) {
                    score -= c[j] * (i - d[j])
                }
            }
            score
        }

        val ans = Stack<Int>()
        val d = IntArray(26) // 最後におこなった日
        for (i in 0 until D) {
            var sMax = 0L
            var jMax = 0
            for (j in 0 until 26) {
                ans.push(j)
                val sco = calcScore(ans)
                if (sMax < sco) {
                    sMax = sco
                    jMax = j
                }
                ans.pop()
            }
            ans.push(jMax)
            d[jMax] = i
        }

        ans.forEach { pw.println(it + 1) }
    }
}
