import java.io.BufferedReader
import java.io.InputStreamReader
import java.io.PrintWriter
import java.util.*
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.sqrt

val br = BufferedReader(InputStreamReader(System.`in`))
val out = PrintWriter(System.out)

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

fun solve() {
    val d = readInteger()
    val cList = readLongList()
    val sPerDay = Array(d) { readLongList() }
    val tArray = Array(d) { 0 }

    for (i in 0 until d) {
        var maxT = 1
        var maxScore = Long.MIN_VALUE
        for (j in 0 until 26) {
            tArray[i] = j + 1
            val tmpScore = calcScore(i + 1, cList, sPerDay, tArray)

            if (tmpScore > maxScore) {
                maxT = j + 1
                maxScore = tmpScore
            }
        }

//        out.println("max score: $maxScore")
        tArray[i] = maxT
    }

    for (t in tArray) {
        out.println(t)
    }
}

fun calcScore(d: Int, cList: List<Long>, sPerDay: Array<List<Long>>, tArray: Array<Int>): Long {
    var score = 0L
    val last = IntArray(26)
    for (i in 0 until d) {
        val contestNo = tArray[i] - 1
        score += sPerDay[i][contestNo]

        last[contestNo] = i + 1

        for (j in 0 until 26) score -= cList[j] * ((i + 1) - last[j])
    }

    return score
}


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)
