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){
            StringTokenizer st=new StringTokenizer(br.readLine());
            int x=Integer.parseInt(st.nextToken());
            int y=Integer.parseInt(st.nextToken());
            if(x==0&&y==0) break;
            System.out.println(Math.min(x,y)+" "+Math.max(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){
            StringTokenizer st=new StringTokenizer(br.readLine());
            int x=Integer.parseInt(st.nextToken());
            int y=Integer.parseInt(st.nextToken());
            if(x==0&&y==0) break;
            System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        }
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        while(true){
            StringTokenizer st=new StringTokenizer(br.readLine());
            int x=Integer.parseInt(st.nextToken());
            int y=Integer.parseInt(st.nextToken());
            if(x==0&&y==0) break;
            System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        }
    } main {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        while(true){
            StringTokenizer st=new StringTokenizer(br.readLine());
            int x=Integer.parseInt(st.nextToken());
            int y=Integer.parseInt(st.nextToken());
            if(x==0&&y==0) break;
            System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        }
    } BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
            StringTokenizer st=new StringTokenizer(br.readLine());
            int x=Integer.parseInt(st.nextToken());
            int y=Integer.parseInt(st.nextToken());
            if(x==0&&y==0) break;
            System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        } true {
            StringTokenizer st=new StringTokenizer(br.readLine());
            int x=Integer.parseInt(st.nextToken());
            int y=Integer.parseInt(st.nextToken());
            if(x==0&&y==0) break;
            System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        } StringTokenizer st=new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) int x=Integer.parseInt(st.nextToken()); x Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int y=Integer.parseInt(st.nextToken()); y Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st if(x==0&&y==0) break; x==0&&y==0 x==0 x 0 y==0 y 0 break; System.out.println(Math.min(x,y)+" "+Math.max(x,y)) System.out.println System.out System System.out Math.min(x,y)+" "+Math.max(x,y) Math.min(x,y)+" "+Math.max(x,y) Math.min(x,y) Math.min Math x y " " Math.max(x,y) Math.max Math 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){
            StringTokenizer st=new StringTokenizer(br.readLine());
            int x=Integer.parseInt(st.nextToken());
            int y=Integer.parseInt(st.nextToken());
            if(x==0&&y==0) break;
            System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        }
    }
}