import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;

public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;

        while( ((line = br.readLine()) != null) && !(line.equals("0 0"))){
            String[] input = line.split(" " , 2);
            int a = Integer.valueOf(input[0]);
            int b = Integer.valueOf(input[1]);
            if(a > b)   System.out.println(b + " " + a);
            else        System.out.println(a + " " + b);
        }
    }
} import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader java.io public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;

        while( ((line = br.readLine()) != null) && !(line.equals("0 0"))){
            String[] input = line.split(" " , 2);
            int a = Integer.valueOf(input[0]);
            int b = Integer.valueOf(input[1]);
            if(a > b)   System.out.println(b + " " + a);
            else        System.out.println(a + " " + b);
        }
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;

        while( ((line = br.readLine()) != null) && !(line.equals("0 0"))){
            String[] input = line.split(" " , 2);
            int a = Integer.valueOf(input[0]);
            int b = Integer.valueOf(input[1]);
            if(a > b)   System.out.println(b + " " + a);
            else        System.out.println(a + " " + b);
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;

        while( ((line = br.readLine()) != null) && !(line.equals("0 0"))){
            String[] input = line.split(" " , 2);
            int a = Integer.valueOf(input[0]);
            int b = Integer.valueOf(input[1]);
            if(a > b)   System.out.println(b + " " + a);
            else        System.out.println(a + " " + b);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line; line while( ((line = br.readLine()) != null) && !(line.equals("0 0"))){
            String[] input = line.split(" " , 2);
            int a = Integer.valueOf(input[0]);
            int b = Integer.valueOf(input[1]);
            if(a > b)   System.out.println(b + " " + a);
            else        System.out.println(a + " " + b);
        } ((line = br.readLine()) != null) && !(line.equals("0 0")) ((line = br.readLine()) != null) (line = br.readLine()) line br.readLine() br.readLine br null !(line.equals("0 0")) (line.equals("0 0")) line.equals line "0 0" {
            String[] input = line.split(" " , 2);
            int a = Integer.valueOf(input[0]);
            int b = Integer.valueOf(input[1]);
            if(a > b)   System.out.println(b + " " + a);
            else        System.out.println(a + " " + b);
        } String[] input = line.split(" " , 2); input line.split(" " , 2) line.split line " " 2 int a = Integer.valueOf(input[0]); a Integer.valueOf(input[0]) Integer.valueOf Integer input[0] input 0 int b = Integer.valueOf(input[1]); b Integer.valueOf(input[1]) Integer.valueOf Integer input[1] input 1 if(a > b)   System.out.println(b + " " + a);
            else        System.out.println(a + " " + b); a > b a b System.out.println(b + " " + a) System.out.println System.out System System.out b + " " + a b + " " + a b " " a System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b String[] args args public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;

        while( ((line = br.readLine()) != null) && !(line.equals("0 0"))){
            String[] input = line.split(" " , 2);
            int a = Integer.valueOf(input[0]);
            int b = Integer.valueOf(input[1]);
            if(a > b)   System.out.println(b + " " + a);
            else        System.out.println(a + " " + b);
        }
    }
} public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;

        while( ((line = br.readLine()) != null) && !(line.equals("0 0"))){
            String[] input = line.split(" " , 2);
            int a = Integer.valueOf(input[0]);
            int b = Integer.valueOf(input[1]);
            if(a > b)   System.out.println(b + " " + a);
            else        System.out.println(a + " " + b);
        }
    }
} Main
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;

public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;

        while( ((line = br.readLine()) != null) && !(line.equals("0 0"))){
            String[] input = line.split(" " , 2);
            int a = Integer.valueOf(input[0]);
            int b = Integer.valueOf(input[1]);
            if(a > b)   System.out.println(b + " " + a);
            else        System.out.println(a + " " + b);
        }
    }
}