fun main(args: Array<String>) {
    for (i in 1..3000) {
        val inStr: String? = readLine()
        if (inStr === null) {
            return
        }
        val inStrList = inStr.split(' ')
        if (inStrList.size != 2) {
            return
        }
        val dataSets = inStrList.map { s -> s.toInt() }
        if (dataSets.any { n -> (n < 0) || (n > 10000) }) {
            return
        }
        if (dataSets.all { n -> n == 0 }) {
            return
        }
        val sortedDataSets = dataSets.sorted()
        val outString = sortedDataSets.joinToString(" ")
        println(outString)
    }
}

