import java.io.*;

class Main {
	public static void main(String[] args) {
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			while(true){
			 String buf = br.readLine();

			 String[] line = buf.split(" ");
			 int x = Integer.parseInt(line[0]);
			 int y = Integer.parseInt(line[1]);			
				if( x ==0 && y == 0) break;
				if( x > y){
					System.out.print(y+" "+x);
				} else if( x < y ){
					System.out.print(x+" "+y);
				} else {
					System.out.print(x+" "+y);
				}
				System.out.print("\n");
			
			}
		} catch(Exception e){
		}
	} 
} import java.io.*; io.* java class Main {
	public static void main(String[] args) {
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			while(true){
			 String buf = br.readLine();

			 String[] line = buf.split(" ");
			 int x = Integer.parseInt(line[0]);
			 int y = Integer.parseInt(line[1]);			
				if( x ==0 && y == 0) break;
				if( x > y){
					System.out.print(y+" "+x);
				} else if( x < y ){
					System.out.print(x+" "+y);
				} else {
					System.out.print(x+" "+y);
				}
				System.out.print("\n");
			
			}
		} catch(Exception e){
		}
	} 
} Main public static void main(String[] args) {
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			while(true){
			 String buf = br.readLine();

			 String[] line = buf.split(" ");
			 int x = Integer.parseInt(line[0]);
			 int y = Integer.parseInt(line[1]);			
				if( x ==0 && y == 0) break;
				if( x > y){
					System.out.print(y+" "+x);
				} else if( x < y ){
					System.out.print(x+" "+y);
				} else {
					System.out.print(x+" "+y);
				}
				System.out.print("\n");
			
			}
		} catch(Exception e){
		}
	} main {
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			while(true){
			 String buf = br.readLine();

			 String[] line = buf.split(" ");
			 int x = Integer.parseInt(line[0]);
			 int y = Integer.parseInt(line[1]);			
				if( x ==0 && y == 0) break;
				if( x > y){
					System.out.print(y+" "+x);
				} else if( x < y ){
					System.out.print(x+" "+y);
				} else {
					System.out.print(x+" "+y);
				}
				System.out.print("\n");
			
			}
		} catch(Exception e){
		}
	} try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			while(true){
			 String buf = br.readLine();

			 String[] line = buf.split(" ");
			 int x = Integer.parseInt(line[0]);
			 int y = Integer.parseInt(line[1]);			
				if( x ==0 && y == 0) break;
				if( x > y){
					System.out.print(y+" "+x);
				} else if( x < y ){
					System.out.print(x+" "+y);
				} else {
					System.out.print(x+" "+y);
				}
				System.out.print("\n");
			
			}
		} catch(Exception e){
		} catch(Exception e){
		} Exception e {
		} {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			while(true){
			 String buf = br.readLine();

			 String[] line = buf.split(" ");
			 int x = Integer.parseInt(line[0]);
			 int y = Integer.parseInt(line[1]);			
				if( x ==0 && y == 0) break;
				if( x > y){
					System.out.print(y+" "+x);
				} else if( x < y ){
					System.out.print(x+" "+y);
				} else {
					System.out.print(x+" "+y);
				}
				System.out.print("\n");
			
			}
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
			 String buf = br.readLine();

			 String[] line = buf.split(" ");
			 int x = Integer.parseInt(line[0]);
			 int y = Integer.parseInt(line[1]);			
				if( x ==0 && y == 0) break;
				if( x > y){
					System.out.print(y+" "+x);
				} else if( x < y ){
					System.out.print(x+" "+y);
				} else {
					System.out.print(x+" "+y);
				}
				System.out.print("\n");
			
			} true {
			 String buf = br.readLine();

			 String[] line = buf.split(" ");
			 int x = Integer.parseInt(line[0]);
			 int y = Integer.parseInt(line[1]);			
				if( x ==0 && y == 0) break;
				if( x > y){
					System.out.print(y+" "+x);
				} else if( x < y ){
					System.out.print(x+" "+y);
				} else {
					System.out.print(x+" "+y);
				}
				System.out.print("\n");
			
			} String buf = br.readLine(); buf br.readLine() br.readLine br String[] line = buf.split(" "); line buf.split(" ") buf.split buf " " int x = Integer.parseInt(line[0]); x Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int y = Integer.parseInt(line[1]); y Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 if( x ==0 && y == 0) break; x ==0 && y == 0 x ==0 x 0 y == 0 y 0 break; if( x > y){
					System.out.print(y+" "+x);
				} else if( x < y ){
					System.out.print(x+" "+y);
				} else {
					System.out.print(x+" "+y);
				} x > y x y {
					System.out.print(y+" "+x);
				} System.out.print(y+" "+x) System.out.print System.out System System.out y+" "+x y+" "+x y " " x if( x < y ){
					System.out.print(x+" "+y);
				} else {
					System.out.print(x+" "+y);
				} x < y x y {
					System.out.print(x+" "+y);
				} System.out.print(x+" "+y) System.out.print System.out System System.out x+" "+y x+" "+y x " " y {
					System.out.print(x+" "+y);
				} System.out.print(x+" "+y) System.out.print System.out System System.out x+" "+y x+" "+y x " " y System.out.print("\n") System.out.print System.out System System.out "\n" String[] args args
import java.io.*;

class Main {
	public static void main(String[] args) {
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			while(true){
			 String buf = br.readLine();

			 String[] line = buf.split(" ");
			 int x = Integer.parseInt(line[0]);
			 int y = Integer.parseInt(line[1]);			
				if( x ==0 && y == 0) break;
				if( x > y){
					System.out.print(y+" "+x);
				} else if( x < y ){
					System.out.print(x+" "+y);
				} else {
					System.out.print(x+" "+y);
				}
				System.out.print("\n");
			
			}
		} catch(Exception e){
		}
	} 
}