import java.io.PrintWriter
import kotlin.math.max
import kotlin.random.Random

val br = System.`in`.bufferedReader()
val out = PrintWriter(System.out)

fun main() {
    br.use { out.use {
        solve()
        out.flush()
    } }
}

fun solve() {
    val d = readInteger()
    val cList = readLongList()
    val satisfyTable = Array(d) { readLongList() }

    fun score(tmp: IntArray): Long {
        var s = 0L

        val last = IntArray(26)
        for ((i, t) in tmp.withIndex()) {
            s += satisfyTable[i][t]

            last[t] = i + 1

            var tmp = 0L
            for (i in 0 until 26) {
                tmp += cList[i] * (i + 1 - last[i])
            }
            s -= tmp
        }

        return s
    }

    var maxScore = 0L
    var maxList = IntArray(0)
    repeat (10000) {
        val tmp = IntArray(d)
        for (i in 0 until d) {
            tmp[i] = Random.nextInt(26)
        }
        val score = score(tmp)
        
        if (score > maxScore) {
            maxList = tmp
            maxScore = score
        }
    }

//    out.println(maxScore)
    out.println(maxList.map {it + 1}.joinToString("\n"))
}

fun readInteger() = Integer.parseInt(br.readLine())
fun readLong() = java.lang.Long.parseLong(br.readLine())
fun readStringList() = br.readLine()!!.split(' ')
fun readIntegerList() = readStringList().map(Integer::parseInt)
fun readLongList() = readStringList().map(java.lang.Long::parseLong)
fun readDoubleList() = readStringList().map(java.lang.Double::parseDouble)
