import java.io.PrintWriter;
import java.util.Scanner;

class Main {
    private static final Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        while (true) {
            int x = Integer.parseInt(sc.next());
            int y = Integer.parseInt(sc.next());
            if(x==0&&y==0) break;
            if(x<=y) System.out.println(x+" "+y);
            else System.out.println(y+" "+x);
        }
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util class Main {
    private static final Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        while (true) {
            int x = Integer.parseInt(sc.next());
            int y = Integer.parseInt(sc.next());
            if(x==0&&y==0) break;
            if(x<=y) System.out.println(x+" "+y);
            else System.out.println(y+" "+x);
        }
    }
} Main private static final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        while (true) {
            int x = Integer.parseInt(sc.next());
            int y = Integer.parseInt(sc.next());
            if(x==0&&y==0) break;
            if(x<=y) System.out.println(x+" "+y);
            else System.out.println(y+" "+x);
        }
    } main {
        while (true) {
            int x = Integer.parseInt(sc.next());
            int y = Integer.parseInt(sc.next());
            if(x==0&&y==0) break;
            if(x<=y) System.out.println(x+" "+y);
            else System.out.println(y+" "+x);
        }
    } while (true) {
            int x = Integer.parseInt(sc.next());
            int y = Integer.parseInt(sc.next());
            if(x==0&&y==0) break;
            if(x<=y) System.out.println(x+" "+y);
            else System.out.println(y+" "+x);
        } true {
            int x = Integer.parseInt(sc.next());
            int y = Integer.parseInt(sc.next());
            if(x==0&&y==0) break;
            if(x<=y) System.out.println(x+" "+y);
            else System.out.println(y+" "+x);
        } int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int y = Integer.parseInt(sc.next()); y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(x==0&&y==0) break; x==0&&y==0 x==0 x 0 y==0 y 0 break; if(x<=y) System.out.println(x+" "+y);
            else System.out.println(y+" "+x); x<=y x y System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y System.out.println(y+" "+x) System.out.println System.out System System.out y+" "+x y+" "+x y " " x String[] args args
import java.io.PrintWriter;
import java.util.Scanner;

class Main {
    private static final Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        while (true) {
            int x = Integer.parseInt(sc.next());
            int y = Integer.parseInt(sc.next());
            if(x==0&&y==0) break;
            if(x<=y) System.out.println(x+" "+y);
            else System.out.println(y+" "+x);
        }
    }
}