import java.util.Scanner;
import java.util.Arrays;

class Main{
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        while(true){
            String str = input.nextLine();
            String[] str1 = str.split(" ");
            int x = Integer.parseInt(str1[0]);
            int y = Integer.parseInt(str1[1]);
            if(x==0 && y==0){
                break;
            }else{
                int[] output = {x,y};
                Arrays.sort(output);
                System.out.println(output[0] + " " + output[1]);
            }
            

        }
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main{
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        while(true){
            String str = input.nextLine();
            String[] str1 = str.split(" ");
            int x = Integer.parseInt(str1[0]);
            int y = Integer.parseInt(str1[1]);
            if(x==0 && y==0){
                break;
            }else{
                int[] output = {x,y};
                Arrays.sort(output);
                System.out.println(output[0] + " " + output[1]);
            }
            

        }
    }
} Main public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        while(true){
            String str = input.nextLine();
            String[] str1 = str.split(" ");
            int x = Integer.parseInt(str1[0]);
            int y = Integer.parseInt(str1[1]);
            if(x==0 && y==0){
                break;
            }else{
                int[] output = {x,y};
                Arrays.sort(output);
                System.out.println(output[0] + " " + output[1]);
            }
            

        }
    } main {
        Scanner input = new Scanner(System.in);
        while(true){
            String str = input.nextLine();
            String[] str1 = str.split(" ");
            int x = Integer.parseInt(str1[0]);
            int y = Integer.parseInt(str1[1]);
            if(x==0 && y==0){
                break;
            }else{
                int[] output = {x,y};
                Arrays.sort(output);
                System.out.println(output[0] + " " + output[1]);
            }
            

        }
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) while(true){
            String str = input.nextLine();
            String[] str1 = str.split(" ");
            int x = Integer.parseInt(str1[0]);
            int y = Integer.parseInt(str1[1]);
            if(x==0 && y==0){
                break;
            }else{
                int[] output = {x,y};
                Arrays.sort(output);
                System.out.println(output[0] + " " + output[1]);
            }
            

        } true {
            String str = input.nextLine();
            String[] str1 = str.split(" ");
            int x = Integer.parseInt(str1[0]);
            int y = Integer.parseInt(str1[1]);
            if(x==0 && y==0){
                break;
            }else{
                int[] output = {x,y};
                Arrays.sort(output);
                System.out.println(output[0] + " " + output[1]);
            }
            

        } String str = input.nextLine(); str input.nextLine() input.nextLine input String[] str1 = str.split(" "); str1 str.split(" ") str.split str " " int x = Integer.parseInt(str1[0]); x Integer.parseInt(str1[0]) Integer.parseInt Integer str1[0] str1 0 int y = Integer.parseInt(str1[1]); y Integer.parseInt(str1[1]) Integer.parseInt Integer str1[1] str1 1 if(x==0 && y==0){
                break;
            }else{
                int[] output = {x,y};
                Arrays.sort(output);
                System.out.println(output[0] + " " + output[1]);
            } x==0 && y==0 x==0 x 0 y==0 y 0 {
                break;
            } break; {
                int[] output = {x,y};
                Arrays.sort(output);
                System.out.println(output[0] + " " + output[1]);
            } int[] output = {x,y}; output {x,y} x y Arrays.sort(output) Arrays.sort Arrays output System.out.println(output[0] + " " + output[1]) System.out.println System.out System System.out output[0] + " " + output[1] output[0] + " " + output[1] output[0] output 0 " " output[1] output 1 String[] args args
import java.util.Scanner;
import java.util.Arrays;

class Main{
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        while(true){
            String str = input.nextLine();
            String[] str1 = str.split(" ");
            int x = Integer.parseInt(str1[0]);
            int y = Integer.parseInt(str1[1]);
            if(x==0 && y==0){
                break;
            }else{
                int[] output = {x,y};
                Arrays.sort(output);
                System.out.println(output[0] + " " + output[1]);
            }
            

        }
    }
}
