fun main(args: Array<String>) {
    var D = readLine()!!.toInt()
    var c = readLine()!!.split(" ").map{it.toInt()}

    val s = mutableListOf<List<Int>>()
    for(i in 0 until D) {
        s.add(readLine()!!.split(" ").map{it.toInt()})
    }

//    var t = mutableListOf<Int>()
//    for(i in 0 until D) {
//        t.add(readLine()!!.toInt())
//    }
    var last = Array(366){Array(26){0}}
    var point = Array(26){0}
    var t = Array(365){0}

    for(i in 0 until 26) {
        point[i] = s[0][i]
        for(j in 0 until 26) {
            if(i == j) continue
            point[i] -= c[i]
        }
        if(point[t[0]] < point[i]) t[0] = i
    }
    for(i in 0 until 26) {
        if(i != t[0]) last[1][t[0]]++
    }
    for(i in 1 until D) {
        for(j in 0 until 26) {
            point[j] = s[i][j]
            for(k in 0 until 26) {
                if(j == k) continue
                point[j] -= c[j] * (i + 1 - last[i][j])
            }
            if(point[t[i]] < point[j]) t[i] = j
        }
        for(j in 0 until 26) {
            if(j != t[i]) last[i + 1][j] + last[i][j]
        }
//        println(point[t[i]])
    }

    for(i in 0 until D) {
        println(t[i] + 1)
    }

}