fun main(args: Array<String>) {
    while(true)
    {
        var list = readLine()!!.split(" ").map(String::toInt)
        if ((list[0]==0) and (list[1]==0))
        {
            return
        }
        list = list.sorted()
        println("%d %d".format(list[0],list[1]))
    }
}
