func greedy() -> [Int] {
    var ts: [Int] = []
    var lastContestDate: [Int] = Array(repeating: 0, count: 26)
    
    for d in 1...D {
        var todaySatisfactionPoint: Int = 0
        var contestType = 0
        // type i のコンテストを実施したときの満足値を計算する
        for i in 0..<26 {
            var tempSatisfactionPoint: Int = ss[d-1][i]
            for j in 0..<26 {
                if i==j { continue }
                tempSatisfactionPoint -= cs[j]*(d - lastContestDate[j])
            }
            if tempSatisfactionPoint > todaySatisfactionPoint {
                todaySatisfactionPoint = tempSatisfactionPoint
                contestType = i + 1
            }
        }
        lastContestDate[contestType] = d
        ts.append(contestType)
    }
    return ts
}

let D = Int(readLine()!)!
let cs: [Int] = readLine()!.split(separator: " ").map { Int($0)! }
let ss: [[Int]] = (1...D).map { _ in readLine()!.split(separator: " ").map { Int($0)! } }

let res: [Int] = greedy()

for r in res {
    print(r)	// (๑•ૅㅁ•๑)
}