fun main(args: Array<String>) {
    readLine() // ignore n
    val inStr = readLine() ?: return
    val seqNum = inStr.split(' ').map { i -> i.toInt() }
    val reversedSeq = seqNum.reversed()
    println(reversedSeq.joinToString(" "))
}

