import java.util.Scanner;

/**
 * Created by labuser on 2016/04/19.
 */
public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {

        int a, b;

        Scanner sc = new Scanner(System.in);
        while(true){
            String[] input = sc.nextLine().split(" ");
            a = Integer.parseInt(input[0]);
            b = Integer.parseInt(input[1]);
            if(a ==0 && b ==0){
                break;
            }
            System.out.println(Math.min(a,b)+" "+Math.max(a,b));
        }

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {

        int a, b;

        Scanner sc = new Scanner(System.in);
        while(true){
            String[] input = sc.nextLine().split(" ");
            a = Integer.parseInt(input[0]);
            b = Integer.parseInt(input[1]);
            if(a ==0 && b ==0){
                break;
            }
            System.out.println(Math.min(a,b)+" "+Math.max(a,b));
        }

    }
} Main public static void main(String[] args) {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args private void run() {

        int a, b;

        Scanner sc = new Scanner(System.in);
        while(true){
            String[] input = sc.nextLine().split(" ");
            a = Integer.parseInt(input[0]);
            b = Integer.parseInt(input[1]);
            if(a ==0 && b ==0){
                break;
            }
            System.out.println(Math.min(a,b)+" "+Math.max(a,b));
        }

    } run {

        int a, b;

        Scanner sc = new Scanner(System.in);
        while(true){
            String[] input = sc.nextLine().split(" ");
            a = Integer.parseInt(input[0]);
            b = Integer.parseInt(input[1]);
            if(a ==0 && b ==0){
                break;
            }
            System.out.println(Math.min(a,b)+" "+Math.max(a,b));
        }

    } int a a b; b Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(true){
            String[] input = sc.nextLine().split(" ");
            a = Integer.parseInt(input[0]);
            b = Integer.parseInt(input[1]);
            if(a ==0 && b ==0){
                break;
            }
            System.out.println(Math.min(a,b)+" "+Math.max(a,b));
        } true {
            String[] input = sc.nextLine().split(" ");
            a = Integer.parseInt(input[0]);
            b = Integer.parseInt(input[1]);
            if(a ==0 && b ==0){
                break;
            }
            System.out.println(Math.min(a,b)+" "+Math.max(a,b));
        } String[] input = sc.nextLine().split(" "); input sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " a = Integer.parseInt(input[0]) a Integer.parseInt(input[0]) Integer.parseInt Integer input[0] input 0 b = Integer.parseInt(input[1]) b Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 if(a ==0 && b ==0){
                break;
            } a ==0 && b ==0 a ==0 a 0 b ==0 b 0 {
                break;
            } break; System.out.println(Math.min(a,b)+" "+Math.max(a,b)) System.out.println System.out System System.out Math.min(a,b)+" "+Math.max(a,b) Math.min(a,b)+" "+Math.max(a,b) Math.min(a,b) Math.min Math a b " " Math.max(a,b) Math.max Math a b public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {

        int a, b;

        Scanner sc = new Scanner(System.in);
        while(true){
            String[] input = sc.nextLine().split(" ");
            a = Integer.parseInt(input[0]);
            b = Integer.parseInt(input[1]);
            if(a ==0 && b ==0){
                break;
            }
            System.out.println(Math.min(a,b)+" "+Math.max(a,b));
        }

    }
} public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {

        int a, b;

        Scanner sc = new Scanner(System.in);
        while(true){
            String[] input = sc.nextLine().split(" ");
            a = Integer.parseInt(input[0]);
            b = Integer.parseInt(input[1]);
            if(a ==0 && b ==0){
                break;
            }
            System.out.println(Math.min(a,b)+" "+Math.max(a,b));
        }

    }
} Main
import java.util.Scanner;

/**
 * Created by labuser on 2016/04/19.
 */
public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {

        int a, b;

        Scanner sc = new Scanner(System.in);
        while(true){
            String[] input = sc.nextLine().split(" ");
            a = Integer.parseInt(input[0]);
            b = Integer.parseInt(input[1]);
            if(a ==0 && b ==0){
                break;
            }
            System.out.println(Math.min(a,b)+" "+Math.max(a,b));
        }

    }
}