import java.io.*;
import java.util.*;

class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader r =
         new BufferedReader(new InputStreamReader(System.in));       
        String line = r.readLine();   
        
        int cnt=1;
        int buf[]= {0,0};
        while(line!=null){
            String st[] = line.split(" ",0);
            buf[0] = Integer.parseInt(st[0]);
            buf[1]= Integer.parseInt(st[1]);
            if (buf[0] == 0 && buf[1]==0) break;
            Arrays.sort(buf);
            System.out.println(buf[0]+" "+buf[1]);
            line = r.readLine();
        }        
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader r =
         new BufferedReader(new InputStreamReader(System.in));       
        String line = r.readLine();   
        
        int cnt=1;
        int buf[]= {0,0};
        while(line!=null){
            String st[] = line.split(" ",0);
            buf[0] = Integer.parseInt(st[0]);
            buf[1]= Integer.parseInt(st[1]);
            if (buf[0] == 0 && buf[1]==0) break;
            Arrays.sort(buf);
            System.out.println(buf[0]+" "+buf[1]);
            line = r.readLine();
        }        
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader r =
         new BufferedReader(new InputStreamReader(System.in));       
        String line = r.readLine();   
        
        int cnt=1;
        int buf[]= {0,0};
        while(line!=null){
            String st[] = line.split(" ",0);
            buf[0] = Integer.parseInt(st[0]);
            buf[1]= Integer.parseInt(st[1]);
            if (buf[0] == 0 && buf[1]==0) break;
            Arrays.sort(buf);
            System.out.println(buf[0]+" "+buf[1]);
            line = r.readLine();
        }        
    } main {
        BufferedReader r =
         new BufferedReader(new InputStreamReader(System.in));       
        String line = r.readLine();   
        
        int cnt=1;
        int buf[]= {0,0};
        while(line!=null){
            String st[] = line.split(" ",0);
            buf[0] = Integer.parseInt(st[0]);
            buf[1]= Integer.parseInt(st[1]);
            if (buf[0] == 0 && buf[1]==0) break;
            Arrays.sort(buf);
            System.out.println(buf[0]+" "+buf[1]);
            line = r.readLine();
        }        
    } BufferedReader r =
         new BufferedReader(new InputStreamReader(System.in)); r new BufferedReader(new InputStreamReader(System.in)) String line = r.readLine(); line r.readLine() r.readLine r int cnt=1; cnt 1 int buf[]= {0,0}; buf {0,0} 0 0 while(line!=null){
            String st[] = line.split(" ",0);
            buf[0] = Integer.parseInt(st[0]);
            buf[1]= Integer.parseInt(st[1]);
            if (buf[0] == 0 && buf[1]==0) break;
            Arrays.sort(buf);
            System.out.println(buf[0]+" "+buf[1]);
            line = r.readLine();
        } line!=null line null {
            String st[] = line.split(" ",0);
            buf[0] = Integer.parseInt(st[0]);
            buf[1]= Integer.parseInt(st[1]);
            if (buf[0] == 0 && buf[1]==0) break;
            Arrays.sort(buf);
            System.out.println(buf[0]+" "+buf[1]);
            line = r.readLine();
        } String st[] = line.split(" ",0); st line.split(" ",0) line.split line " " 0 buf[0] = Integer.parseInt(st[0]) buf[0] buf 0 Integer.parseInt(st[0]) Integer.parseInt Integer st[0] st 0 buf[1]= Integer.parseInt(st[1]) buf[1] buf 1 Integer.parseInt(st[1]) Integer.parseInt Integer st[1] st 1 if (buf[0] == 0 && buf[1]==0) break; buf[0] == 0 && buf[1]==0 buf[0] == 0 buf[0] buf 0 0 buf[1]==0 buf[1] buf 1 0 break; Arrays.sort(buf) Arrays.sort Arrays buf System.out.println(buf[0]+" "+buf[1]) System.out.println System.out System System.out buf[0]+" "+buf[1] buf[0]+" "+buf[1] buf[0] buf 0 " " buf[1] buf 1 line = r.readLine() line r.readLine() r.readLine r String[] args args
import java.io.*;
import java.util.*;

class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader r =
         new BufferedReader(new InputStreamReader(System.in));       
        String line = r.readLine();   
        
        int cnt=1;
        int buf[]= {0,0};
        while(line!=null){
            String st[] = line.split(" ",0);
            buf[0] = Integer.parseInt(st[0]);
            buf[1]= Integer.parseInt(st[1]);
            if (buf[0] == 0 && buf[1]==0) break;
            Arrays.sort(buf);
            System.out.println(buf[0]+" "+buf[1]);
            line = r.readLine();
        }        
    }
}