import java.io.*;
import java.util.Scanner;
import java.util.Arrays;

class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws IOException {
        for(int i = 0; ; ++i) {
            int v[] = new int[2];
            v[0] = ReadInt();
            v[1] = ReadInt();
            if( v[0] == 0 && v[1] == 0 ) break;
            Arrays.sort(v);
            System.out.println(v[0] + " " + v[1]);            
        }
    }
    static int ReadInt() throws IOException {
        return Integer.parseInt(sc.next());
    }
} import java.io.*; io.* java import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws IOException {
        for(int i = 0; ; ++i) {
            int v[] = new int[2];
            v[0] = ReadInt();
            v[1] = ReadInt();
            if( v[0] == 0 && v[1] == 0 ) break;
            Arrays.sort(v);
            System.out.println(v[0] + " " + v[1]);            
        }
    }
    static int ReadInt() throws IOException {
        return Integer.parseInt(sc.next());
    }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) throws IOException {
        for(int i = 0; ; ++i) {
            int v[] = new int[2];
            v[0] = ReadInt();
            v[1] = ReadInt();
            if( v[0] == 0 && v[1] == 0 ) break;
            Arrays.sort(v);
            System.out.println(v[0] + " " + v[1]);            
        }
    } main {
        for(int i = 0; ; ++i) {
            int v[] = new int[2];
            v[0] = ReadInt();
            v[1] = ReadInt();
            if( v[0] == 0 && v[1] == 0 ) break;
            Arrays.sort(v);
            System.out.println(v[0] + " " + v[1]);            
        }
    } for(int i = 0; ; ++i) {
            int v[] = new int[2];
            v[0] = ReadInt();
            v[1] = ReadInt();
            if( v[0] == 0 && v[1] == 0 ) break;
            Arrays.sort(v);
            System.out.println(v[0] + " " + v[1]);            
        } int i = 0; int i = 0; i 0 ++i ++i i {
            int v[] = new int[2];
            v[0] = ReadInt();
            v[1] = ReadInt();
            if( v[0] == 0 && v[1] == 0 ) break;
            Arrays.sort(v);
            System.out.println(v[0] + " " + v[1]);            
        } {
            int v[] = new int[2];
            v[0] = ReadInt();
            v[1] = ReadInt();
            if( v[0] == 0 && v[1] == 0 ) break;
            Arrays.sort(v);
            System.out.println(v[0] + " " + v[1]);            
        } int v[] = new int[2]; v new int[2] 2 v[0] = ReadInt() v[0] v 0 ReadInt() ReadInt v[1] = ReadInt() v[1] v 1 ReadInt() ReadInt if( v[0] == 0 && v[1] == 0 ) break; v[0] == 0 && v[1] == 0 v[0] == 0 v[0] v 0 0 v[1] == 0 v[1] v 1 0 break; Arrays.sort(v) Arrays.sort Arrays v System.out.println(v[0] + " " + v[1]) System.out.println System.out System System.out v[0] + " " + v[1] v[0] + " " + v[1] v[0] v 0 " " v[1] v 1 String[] args args static int ReadInt() throws IOException {
        return Integer.parseInt(sc.next());
    } ReadInt {
        return Integer.parseInt(sc.next());
    } return Integer.parseInt(sc.next()); Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc
import java.io.*;
import java.util.Scanner;
import java.util.Arrays;

class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws IOException {
        for(int i = 0; ; ++i) {
            int v[] = new int[2];
            v[0] = ReadInt();
            v[1] = ReadInt();
            if( v[0] == 0 && v[1] == 0 ) break;
            Arrays.sort(v);
            System.out.println(v[0] + " " + v[1]);            
        }
    }
    static int ReadInt() throws IOException {
        return Integer.parseInt(sc.next());
    }
}