import java.util.*
import java.util.Random;

fun main(args:Array<String>){
    solve()
}

fun solve(){
    val d = readint()
    val c = readints()
    val s = Array(d){IntArray(26)}
    for(i in 0 until d){
        s[i] = readints().toIntArray()
    }
    val ans = IntArray(d)

    fun score() : Long{
        val t = IntArray(26)
        var sum = 0L
        for(i in 0 until d){
            sum += s[i][ans[i]]
            t[ans[i]] = i
            for(j in 0 until 26){
                sum -= c[j] * (i - t[j])
            }
        }
        return sum
    }

    for(i in 0 until d){
        var ma = 0
        var mai = 0
        for(j in 0 until 26){
            if(ma < s[i][j]){
                ma = s[i][j]
                mai = j
            }
        }
        ans[i] = mai
    }

    var ma = score()
    val rand = Random()

    repeat(300){
        for(i in 0 until d){
            val t = ans[i]
            ans[i] = rand.nextInt(26)
            val m = score()
            if(m > ma){
                ma = m
            }
            else{
                ans[i] = t
            }
        }
    }

    for(i in 0 until d){
        println(ans[i] + 1)
    }
}



fun read() = readLine()!!
fun reads() = readLine()!!.split(" ")
fun readint() = readLine()!!.toInt()
fun readints() = readLine()!!.split(" ").map{it.toInt()}
fun readlong() = readLine()!!.toLong()
fun readlongs() = readLine()!!.split(" ").map{it.toLong()}
