import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br =
            new BufferedReader(new InputStreamReader(System.in), 1);
        String s;
        while(true){
        	s = br.readLine();
        	String[] xy = s.split(" ");
        	int x = Integer.parseInt(xy[0]);
        	int y = Integer.parseInt(xy[1]);
        	if (x==0 && y==0)
        		return;
        	System.out.println(Math.min(x, y) + " " + Math.max(x, y));
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br =
            new BufferedReader(new InputStreamReader(System.in), 1);
        String s;
        while(true){
        	s = br.readLine();
        	String[] xy = s.split(" ");
        	int x = Integer.parseInt(xy[0]);
        	int y = Integer.parseInt(xy[1]);
        	if (x==0 && y==0)
        		return;
        	System.out.println(Math.min(x, y) + " " + Math.max(x, y));
        }
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br =
            new BufferedReader(new InputStreamReader(System.in), 1);
        String s;
        while(true){
        	s = br.readLine();
        	String[] xy = s.split(" ");
        	int x = Integer.parseInt(xy[0]);
        	int y = Integer.parseInt(xy[1]);
        	if (x==0 && y==0)
        		return;
        	System.out.println(Math.min(x, y) + " " + Math.max(x, y));
        }
    } main {
        BufferedReader br =
            new BufferedReader(new InputStreamReader(System.in), 1);
        String s;
        while(true){
        	s = br.readLine();
        	String[] xy = s.split(" ");
        	int x = Integer.parseInt(xy[0]);
        	int y = Integer.parseInt(xy[1]);
        	if (x==0 && y==0)
        		return;
        	System.out.println(Math.min(x, y) + " " + Math.max(x, y));
        }
    } BufferedReader br =
            new BufferedReader(new InputStreamReader(System.in), 1); br new BufferedReader(new InputStreamReader(System.in), 1) String s; s while(true){
        	s = br.readLine();
        	String[] xy = s.split(" ");
        	int x = Integer.parseInt(xy[0]);
        	int y = Integer.parseInt(xy[1]);
        	if (x==0 && y==0)
        		return;
        	System.out.println(Math.min(x, y) + " " + Math.max(x, y));
        } true {
        	s = br.readLine();
        	String[] xy = s.split(" ");
        	int x = Integer.parseInt(xy[0]);
        	int y = Integer.parseInt(xy[1]);
        	if (x==0 && y==0)
        		return;
        	System.out.println(Math.min(x, y) + " " + Math.max(x, y));
        } s = br.readLine() s br.readLine() br.readLine br String[] xy = s.split(" "); xy s.split(" ") s.split s " " int x = Integer.parseInt(xy[0]); x Integer.parseInt(xy[0]) Integer.parseInt Integer xy[0] xy 0 int y = Integer.parseInt(xy[1]); y Integer.parseInt(xy[1]) Integer.parseInt Integer xy[1] xy 1 if (x==0 && y==0)
        		return; x==0 && y==0 x==0 x 0 y==0 y 0 return; 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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br =
            new BufferedReader(new InputStreamReader(System.in), 1);
        String s;
        while(true){
        	s = br.readLine();
        	String[] xy = s.split(" ");
        	int x = Integer.parseInt(xy[0]);
        	int y = Integer.parseInt(xy[1]);
        	if (x==0 && y==0)
        		return;
        	System.out.println(Math.min(x, y) + " " + Math.max(x, y));
        }
    }
}