import java.util.Scanner;

class Main{
        public static void main(String args[]){
                Scanner scan = new Scanner(System.in);
                for(int i=1;i<10001;i++){
                        String val=scan.nextLine();
                        if(val.equals("0 0")){
                                System.exit(0);
                        }
                        String [] num=val.split(" ",0);
                        int x=Integer.parseInt(num[0]);
                        int y=Integer.parseInt(num[1]);
                        if(x<y){
                                System.out.println(x+" "+y);
                        }else{
                                System.out.println(y+" "+x);
                        }
                }
        }
} import java.util.Scanner; Scanner java.util class Main{
        public static void main(String args[]){
                Scanner scan = new Scanner(System.in);
                for(int i=1;i<10001;i++){
                        String val=scan.nextLine();
                        if(val.equals("0 0")){
                                System.exit(0);
                        }
                        String [] num=val.split(" ",0);
                        int x=Integer.parseInt(num[0]);
                        int y=Integer.parseInt(num[1]);
                        if(x<y){
                                System.out.println(x+" "+y);
                        }else{
                                System.out.println(y+" "+x);
                        }
                }
        }
} Main public static void main(String args[]){
                Scanner scan = new Scanner(System.in);
                for(int i=1;i<10001;i++){
                        String val=scan.nextLine();
                        if(val.equals("0 0")){
                                System.exit(0);
                        }
                        String [] num=val.split(" ",0);
                        int x=Integer.parseInt(num[0]);
                        int y=Integer.parseInt(num[1]);
                        if(x<y){
                                System.out.println(x+" "+y);
                        }else{
                                System.out.println(y+" "+x);
                        }
                }
        } main {
                Scanner scan = new Scanner(System.in);
                for(int i=1;i<10001;i++){
                        String val=scan.nextLine();
                        if(val.equals("0 0")){
                                System.exit(0);
                        }
                        String [] num=val.split(" ",0);
                        int x=Integer.parseInt(num[0]);
                        int y=Integer.parseInt(num[1]);
                        if(x<y){
                                System.out.println(x+" "+y);
                        }else{
                                System.out.println(y+" "+x);
                        }
                }
        } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) for(int i=1;i<10001;i++){
                        String val=scan.nextLine();
                        if(val.equals("0 0")){
                                System.exit(0);
                        }
                        String [] num=val.split(" ",0);
                        int x=Integer.parseInt(num[0]);
                        int y=Integer.parseInt(num[1]);
                        if(x<y){
                                System.out.println(x+" "+y);
                        }else{
                                System.out.println(y+" "+x);
                        }
                } int i=1; int i=1; i 1 i<10001 i 10001 i++ i++ i {
                        String val=scan.nextLine();
                        if(val.equals("0 0")){
                                System.exit(0);
                        }
                        String [] num=val.split(" ",0);
                        int x=Integer.parseInt(num[0]);
                        int y=Integer.parseInt(num[1]);
                        if(x<y){
                                System.out.println(x+" "+y);
                        }else{
                                System.out.println(y+" "+x);
                        }
                } {
                        String val=scan.nextLine();
                        if(val.equals("0 0")){
                                System.exit(0);
                        }
                        String [] num=val.split(" ",0);
                        int x=Integer.parseInt(num[0]);
                        int y=Integer.parseInt(num[1]);
                        if(x<y){
                                System.out.println(x+" "+y);
                        }else{
                                System.out.println(y+" "+x);
                        }
                } String val=scan.nextLine(); val scan.nextLine() scan.nextLine scan if(val.equals("0 0")){
                                System.exit(0);
                        } val.equals("0 0") val.equals val "0 0" {
                                System.exit(0);
                        } System.exit(0) System.exit System 0 String [] num=val.split(" ",0); num val.split(" ",0) val.split val " " 0 int x=Integer.parseInt(num[0]); x Integer.parseInt(num[0]) Integer.parseInt Integer num[0] num 0 int y=Integer.parseInt(num[1]); y Integer.parseInt(num[1]) Integer.parseInt Integer num[1] num 1 if(x<y){
                                System.out.println(x+" "+y);
                        }else{
                                System.out.println(y+" "+x);
                        } x<y x y {
                                System.out.println(x+" "+y);
                        } System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y {
                                System.out.println(y+" "+x);
                        } System.out.println(y+" "+x) System.out.println System.out System System.out y+" "+x y+" "+x y " " x String args[] args
import java.util.Scanner;

class Main{
        public static void main(String args[]){
                Scanner scan = new Scanner(System.in);
                for(int i=1;i<10001;i++){
                        String val=scan.nextLine();
                        if(val.equals("0 0")){
                                System.exit(0);
                        }
                        String [] num=val.split(" ",0);
                        int x=Integer.parseInt(num[0]);
                        int y=Integer.parseInt(num[1]);
                        if(x<y){
                                System.out.println(x+" "+y);
                        }else{
                                System.out.println(y+" "+x);
                        }
                }
        }
}