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

class Main{
    public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String s = br.readLine();
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);
            if(x==0 && y==0) break;
            if(x>y){
                int i=0;
                i = x;
                x = y;
                y = i;
                System.out.println(x+" "+y);
            }else if(x<y){
                System.out.println(x+" "+y);
            }else if(x==y){
                System.out.println(x+" "+y);
            }
            
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main{
    public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String s = br.readLine();
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);
            if(x==0 && y==0) break;
            if(x>y){
                int i=0;
                i = x;
                x = y;
                y = i;
                System.out.println(x+" "+y);
            }else if(x<y){
                System.out.println(x+" "+y);
            }else if(x==y){
                System.out.println(x+" "+y);
            }
            
        }
    }
} Main public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String s = br.readLine();
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);
            if(x==0 && y==0) break;
            if(x>y){
                int i=0;
                i = x;
                x = y;
                y = i;
                System.out.println(x+" "+y);
            }else if(x<y){
                System.out.println(x+" "+y);
            }else if(x==y){
                System.out.println(x+" "+y);
            }
            
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String s = br.readLine();
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);
            if(x==0 && y==0) break;
            if(x>y){
                int i=0;
                i = x;
                x = y;
                y = i;
                System.out.println(x+" "+y);
            }else if(x<y){
                System.out.println(x+" "+y);
            }else if(x==y){
                System.out.println(x+" "+y);
            }
            
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
            String s = br.readLine();
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);
            if(x==0 && y==0) break;
            if(x>y){
                int i=0;
                i = x;
                x = y;
                y = i;
                System.out.println(x+" "+y);
            }else if(x<y){
                System.out.println(x+" "+y);
            }else if(x==y){
                System.out.println(x+" "+y);
            }
            
        } true {
            String s = br.readLine();
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);
            if(x==0 && y==0) break;
            if(x>y){
                int i=0;
                i = x;
                x = y;
                y = i;
                System.out.println(x+" "+y);
            }else if(x<y){
                System.out.println(x+" "+y);
            }else if(x==y){
                System.out.println(x+" "+y);
            }
            
        } String s = br.readLine(); s br.readLine() br.readLine br String[] str = s.split(" "); str s.split(" ") s.split s " " int x = Integer.parseInt(str[0]); x Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int y = Integer.parseInt(str[1]); y Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 if(x==0 && y==0) break; x==0 && y==0 x==0 x 0 y==0 y 0 break; if(x>y){
                int i=0;
                i = x;
                x = y;
                y = i;
                System.out.println(x+" "+y);
            }else if(x<y){
                System.out.println(x+" "+y);
            }else if(x==y){
                System.out.println(x+" "+y);
            } x>y x y {
                int i=0;
                i = x;
                x = y;
                y = i;
                System.out.println(x+" "+y);
            } int i=0; i 0 i = x i x x = y x y y = i y i System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y if(x<y){
                System.out.println(x+" "+y);
            }else if(x==y){
                System.out.println(x+" "+y);
            } 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 if(x==y){
                System.out.println(x+" "+y);
            } 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 String args[] args
import java.io.*;
import java.util.*;

class Main{
    public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String s = br.readLine();
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);
            if(x==0 && y==0) break;
            if(x>y){
                int i=0;
                i = x;
                x = y;
                y = i;
                System.out.println(x+" "+y);
            }else if(x<y){
                System.out.println(x+" "+y);
            }else if(x==y){
                System.out.println(x+" "+y);
            }
            
        }
    }
}