import java.util.Scanner;

public class Main {
	
	private void calc(){
		Scanner scanner = new Scanner(System.in);
		short i=1;
		while(true){
			int x=scanner.nextInt();
			int y=scanner.nextInt();
			int temp;
			
			if(x==0 && y==0)break;
			
			if(y<x){
				temp=x;
				x=y;
				y=temp;
			}
			System.out.print(x+" ");
			System.out.println(y);
			i++;
			
		}
		
	}
	
	public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	}
} import java.util.Scanner; Scanner java.util public class Main {
	
	private void calc(){
		Scanner scanner = new Scanner(System.in);
		short i=1;
		while(true){
			int x=scanner.nextInt();
			int y=scanner.nextInt();
			int temp;
			
			if(x==0 && y==0)break;
			
			if(y<x){
				temp=x;
				x=y;
				y=temp;
			}
			System.out.print(x+" ");
			System.out.println(y);
			i++;
			
		}
		
	}
	
	public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	}
} Main private void calc(){
		Scanner scanner = new Scanner(System.in);
		short i=1;
		while(true){
			int x=scanner.nextInt();
			int y=scanner.nextInt();
			int temp;
			
			if(x==0 && y==0)break;
			
			if(y<x){
				temp=x;
				x=y;
				y=temp;
			}
			System.out.print(x+" ");
			System.out.println(y);
			i++;
			
		}
		
	} calc {
		Scanner scanner = new Scanner(System.in);
		short i=1;
		while(true){
			int x=scanner.nextInt();
			int y=scanner.nextInt();
			int temp;
			
			if(x==0 && y==0)break;
			
			if(y<x){
				temp=x;
				x=y;
				y=temp;
			}
			System.out.print(x+" ");
			System.out.println(y);
			i++;
			
		}
		
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) short i=1; i 1 while(true){
			int x=scanner.nextInt();
			int y=scanner.nextInt();
			int temp;
			
			if(x==0 && y==0)break;
			
			if(y<x){
				temp=x;
				x=y;
				y=temp;
			}
			System.out.print(x+" ");
			System.out.println(y);
			i++;
			
		} true {
			int x=scanner.nextInt();
			int y=scanner.nextInt();
			int temp;
			
			if(x==0 && y==0)break;
			
			if(y<x){
				temp=x;
				x=y;
				y=temp;
			}
			System.out.print(x+" ");
			System.out.println(y);
			i++;
			
		} int x=scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int y=scanner.nextInt(); y scanner.nextInt() scanner.nextInt scanner int temp; temp if(x==0 && y==0)break; x==0 && y==0 x==0 x 0 y==0 y 0 break; if(y<x){
				temp=x;
				x=y;
				y=temp;
			} y<x y x {
				temp=x;
				x=y;
				y=temp;
			} temp=x temp x x=y x y y=temp y temp System.out.print(x+" ") System.out.print System.out System System.out x+" " x " " System.out.println(y) System.out.println System.out System System.out y i++ i public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	} main {
		Main run =new Main();
		run.calc();

	} Main run =new Main(); run new Main() run.calc() run.calc run String[] args args public class Main {
	
	private void calc(){
		Scanner scanner = new Scanner(System.in);
		short i=1;
		while(true){
			int x=scanner.nextInt();
			int y=scanner.nextInt();
			int temp;
			
			if(x==0 && y==0)break;
			
			if(y<x){
				temp=x;
				x=y;
				y=temp;
			}
			System.out.print(x+" ");
			System.out.println(y);
			i++;
			
		}
		
	}
	
	public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	}
} public class Main {
	
	private void calc(){
		Scanner scanner = new Scanner(System.in);
		short i=1;
		while(true){
			int x=scanner.nextInt();
			int y=scanner.nextInt();
			int temp;
			
			if(x==0 && y==0)break;
			
			if(y<x){
				temp=x;
				x=y;
				y=temp;
			}
			System.out.print(x+" ");
			System.out.println(y);
			i++;
			
		}
		
	}
	
	public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	}
} Main
import java.util.Scanner;

public class Main {
	
	private void calc(){
		Scanner scanner = new Scanner(System.in);
		short i=1;
		while(true){
			int x=scanner.nextInt();
			int y=scanner.nextInt();
			int temp;
			
			if(x==0 && y==0)break;
			
			if(y<x){
				temp=x;
				x=y;
				y=temp;
			}
			System.out.print(x+" ");
			System.out.println(y);
			i++;
			
		}
		
	}
	
	public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	}
}