import java.util.Scanner;

class Main {
    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);
        while(true){
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(x == 0 && y == 0){
            break;
        }
        System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        }
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);
        while(true){
        int x = sc.nextInt();
        int y = sc.nextInt();
        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 Exception{
        Scanner sc = new Scanner(System.in);
        while(true){
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(x == 0 && y == 0){
            break;
        }
        System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        }
    } main {
        Scanner sc = new Scanner(System.in);
        while(true){
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(x == 0 && y == 0){
            break;
        }
        System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(true){
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(x == 0 && y == 0){
            break;
        }
        System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        } true {
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(x == 0 && y == 0){
            break;
        }
        System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        } int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc if(x == 0 && y == 0){
            break;
        } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
            break;
        } 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.util.Scanner;

class Main {
    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);
        while(true){
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(x == 0 && y == 0){
            break;
        }
        System.out.println(Math.min(x,y)+" "+Math.max(x,y));
        }
    }
}