import java.util.ArrayList;
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
        int count = 0;
        while(true){
            x.add(count,sc.nextInt());
            y.add(count,sc.nextInt());
            if((x.get(count)==0)&&(y.get(count)==0))
                break;
            count += 1;
        }
        for(int i = 0; i < count ; i++){
            System.out.println(Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)));
        }
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
        int count = 0;
        while(true){
            x.add(count,sc.nextInt());
            y.add(count,sc.nextInt());
            if((x.get(count)==0)&&(y.get(count)==0))
                break;
            count += 1;
        }
        for(int i = 0; i < count ; i++){
            System.out.println(Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)));
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
        int count = 0;
        while(true){
            x.add(count,sc.nextInt());
            y.add(count,sc.nextInt());
            if((x.get(count)==0)&&(y.get(count)==0))
                break;
            count += 1;
        }
        for(int i = 0; i < count ; i++){
            System.out.println(Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)));
        }
    } main {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
        int count = 0;
        while(true){
            x.add(count,sc.nextInt());
            y.add(count,sc.nextInt());
            if((x.get(count)==0)&&(y.get(count)==0))
                break;
            count += 1;
        }
        for(int i = 0; i < count ; i++){
            System.out.println(Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)));
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Integer> x = new ArrayList<Integer>(); x new ArrayList<Integer>() ArrayList<Integer> y = new ArrayList<Integer>(); y new ArrayList<Integer>() int count = 0; count 0 while(true){
            x.add(count,sc.nextInt());
            y.add(count,sc.nextInt());
            if((x.get(count)==0)&&(y.get(count)==0))
                break;
            count += 1;
        } true {
            x.add(count,sc.nextInt());
            y.add(count,sc.nextInt());
            if((x.get(count)==0)&&(y.get(count)==0))
                break;
            count += 1;
        } x.add(count,sc.nextInt()) x.add x count sc.nextInt() sc.nextInt sc y.add(count,sc.nextInt()) y.add y count sc.nextInt() sc.nextInt sc if((x.get(count)==0)&&(y.get(count)==0))
                break; (x.get(count)==0)&&(y.get(count)==0) (x.get(count)==0) x.get(count) x.get x count 0 (y.get(count)==0) y.get(count) y.get y count 0 break; count += 1 count 1 for(int i = 0; i < count ; i++){
            System.out.println(Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)));
        } int i = 0; int i = 0; i 0 i < count i count i++ i++ i {
            System.out.println(Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)));
        } {
            System.out.println(Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)));
        } System.out.println(Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i))) System.out.println System.out System System.out Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)) Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)) Math.min(x.get(i),y.get(i)) Math.min Math x.get(i) x.get x i y.get(i) y.get y i " " Math.max(x.get(i),y.get(i)) Math.max Math x.get(i) x.get x i y.get(i) y.get y i String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
        int count = 0;
        while(true){
            x.add(count,sc.nextInt());
            y.add(count,sc.nextInt());
            if((x.get(count)==0)&&(y.get(count)==0))
                break;
            count += 1;
        }
        for(int i = 0; i < count ; i++){
            System.out.println(Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)));
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
        int count = 0;
        while(true){
            x.add(count,sc.nextInt());
            y.add(count,sc.nextInt());
            if((x.get(count)==0)&&(y.get(count)==0))
                break;
            count += 1;
        }
        for(int i = 0; i < count ; i++){
            System.out.println(Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)));
        }
    }
} Main
import java.util.ArrayList;
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
        int count = 0;
        while(true){
            x.add(count,sc.nextInt());
            y.add(count,sc.nextInt());
            if((x.get(count)==0)&&(y.get(count)==0))
                break;
            count += 1;
        }
        for(int i = 0; i < count ; i++){
            System.out.println(Math.min(x.get(i),y.get(i))+" "+Math.max(x.get(i),y.get(i)));
        }
    }
}