import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		
		Scanner scan = new Scanner(System.in);

		int i = 0;
		int min = 0;
		int max = 0;

		while(true){	
		int x = scan.nextInt();
		int y = scan.nextInt();
		if(x>y || x==y){
			min = y;
			max = x;
		}else{
			min = x;
			max = y;
		}
		if(x==0 && y==0) break;
		System.out.println(min + " " + max);
		}
	}
}  import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		
		Scanner scan = new Scanner(System.in);

		int i = 0;
		int min = 0;
		int max = 0;

		while(true){	
		int x = scan.nextInt();
		int y = scan.nextInt();
		if(x>y || x==y){
			min = y;
			max = x;
		}else{
			min = x;
			max = y;
		}
		if(x==0 && y==0) break;
		System.out.println(min + " " + max);
		}
	}
} Main public static void main(String[] args) {
		
		Scanner scan = new Scanner(System.in);

		int i = 0;
		int min = 0;
		int max = 0;

		while(true){	
		int x = scan.nextInt();
		int y = scan.nextInt();
		if(x>y || x==y){
			min = y;
			max = x;
		}else{
			min = x;
			max = y;
		}
		if(x==0 && y==0) break;
		System.out.println(min + " " + max);
		}
	} main {
		
		Scanner scan = new Scanner(System.in);

		int i = 0;
		int min = 0;
		int max = 0;

		while(true){	
		int x = scan.nextInt();
		int y = scan.nextInt();
		if(x>y || x==y){
			min = y;
			max = x;
		}else{
			min = x;
			max = y;
		}
		if(x==0 && y==0) break;
		System.out.println(min + " " + max);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int i = 0; i 0 int min = 0; min 0 int max = 0; max 0 while(true){	
		int x = scan.nextInt();
		int y = scan.nextInt();
		if(x>y || x==y){
			min = y;
			max = x;
		}else{
			min = x;
			max = y;
		}
		if(x==0 && y==0) break;
		System.out.println(min + " " + max);
		} true {	
		int x = scan.nextInt();
		int y = scan.nextInt();
		if(x>y || x==y){
			min = y;
			max = x;
		}else{
			min = x;
			max = y;
		}
		if(x==0 && y==0) break;
		System.out.println(min + " " + max);
		} int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan if(x>y || x==y){
			min = y;
			max = x;
		}else{
			min = x;
			max = y;
		} x>y || x==y x>y x y x==y x y {
			min = y;
			max = x;
		} min = y min y max = x max x {
			min = x;
			max = y;
		} min = x min x max = y max y if(x==0 && y==0) break; x==0 && y==0 x==0 x 0 y==0 y 0 break; System.out.println(min + " " + max) System.out.println System.out System System.out min + " " + max min + " " + max min " " max String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		
		Scanner scan = new Scanner(System.in);

		int i = 0;
		int min = 0;
		int max = 0;

		while(true){	
		int x = scan.nextInt();
		int y = scan.nextInt();
		if(x>y || x==y){
			min = y;
			max = x;
		}else{
			min = x;
			max = y;
		}
		if(x==0 && y==0) break;
		System.out.println(min + " " + max);
		}
	}
} 