public class Main {


		public static void main(String[] args) {
		java.util.Scanner scan = new java.util.Scanner(System.in);
		int x;
		int y;
		int i;
		int t = 0;
		
		do{
		x = scan.nextInt();
		y = scan.nextInt();
		if(0<=x && x<=10000 && 0<=y && y<=10000){
			if(x == 0 && y == 0){
				break;
			}
			if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			}
		}
		t += 1;
		

	}while(t < 3000);
}
} public class Main {


		public static void main(String[] args) {
		java.util.Scanner scan = new java.util.Scanner(System.in);
		int x;
		int y;
		int i;
		int t = 0;
		
		do{
		x = scan.nextInt();
		y = scan.nextInt();
		if(0<=x && x<=10000 && 0<=y && y<=10000){
			if(x == 0 && y == 0){
				break;
			}
			if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			}
		}
		t += 1;
		

	}while(t < 3000);
}
} Main public static void main(String[] args) {
		java.util.Scanner scan = new java.util.Scanner(System.in);
		int x;
		int y;
		int i;
		int t = 0;
		
		do{
		x = scan.nextInt();
		y = scan.nextInt();
		if(0<=x && x<=10000 && 0<=y && y<=10000){
			if(x == 0 && y == 0){
				break;
			}
			if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			}
		}
		t += 1;
		

	}while(t < 3000);
} main {
		java.util.Scanner scan = new java.util.Scanner(System.in);
		int x;
		int y;
		int i;
		int t = 0;
		
		do{
		x = scan.nextInt();
		y = scan.nextInt();
		if(0<=x && x<=10000 && 0<=y && y<=10000){
			if(x == 0 && y == 0){
				break;
			}
			if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			}
		}
		t += 1;
		

	}while(t < 3000);
} java.util.Scanner scan = new java.util.Scanner(System.in); scan new java.util.Scanner(System.in) int x; x int y; y int i; i int t = 0; t 0 do{
		x = scan.nextInt();
		y = scan.nextInt();
		if(0<=x && x<=10000 && 0<=y && y<=10000){
			if(x == 0 && y == 0){
				break;
			}
			if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			}
		}
		t += 1;
		

	}while(t < 3000); t < 3000 t 3000 {
		x = scan.nextInt();
		y = scan.nextInt();
		if(0<=x && x<=10000 && 0<=y && y<=10000){
			if(x == 0 && y == 0){
				break;
			}
			if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			}
		}
		t += 1;
		

	} x = scan.nextInt() x scan.nextInt() scan.nextInt scan y = scan.nextInt() y scan.nextInt() scan.nextInt scan if(0<=x && x<=10000 && 0<=y && y<=10000){
			if(x == 0 && y == 0){
				break;
			}
			if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			}
		} 0<=x && x<=10000 && 0<=y && y<=10000 0<=y 0<=x && x<=10000 && 0<=y && y<=10000 0<=x 0 x x<=10000 x 10000 0<=y 0 y y<=10000 y 10000 {
			if(x == 0 && y == 0){
				break;
			}
			if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			}
		} if(x == 0 && y == 0){
				break;
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				break;
			} break; if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			} x<=y x y {
			System.out.println(x+" "+y);
			} System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			} x>y x y {
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			} i = x i x x = y x y y = i y i System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y t += 1 t 1 String[] args args public class Main {


		public static void main(String[] args) {
		java.util.Scanner scan = new java.util.Scanner(System.in);
		int x;
		int y;
		int i;
		int t = 0;
		
		do{
		x = scan.nextInt();
		y = scan.nextInt();
		if(0<=x && x<=10000 && 0<=y && y<=10000){
			if(x == 0 && y == 0){
				break;
			}
			if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			}
		}
		t += 1;
		

	}while(t < 3000);
}
} public class Main {


		public static void main(String[] args) {
		java.util.Scanner scan = new java.util.Scanner(System.in);
		int x;
		int y;
		int i;
		int t = 0;
		
		do{
		x = scan.nextInt();
		y = scan.nextInt();
		if(0<=x && x<=10000 && 0<=y && y<=10000){
			if(x == 0 && y == 0){
				break;
			}
			if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			}
		}
		t += 1;
		

	}while(t < 3000);
}
} Main
public class Main {


		public static void main(String[] args) {
		java.util.Scanner scan = new java.util.Scanner(System.in);
		int x;
		int y;
		int i;
		int t = 0;
		
		do{
		x = scan.nextInt();
		y = scan.nextInt();
		if(0<=x && x<=10000 && 0<=y && y<=10000){
			if(x == 0 && y == 0){
				break;
			}
			if(x<=y){
			System.out.println(x+" "+y);
			}else if(x>y){
				i = x;
				x = y;
				y = i;
				System.out.println(x+" "+y);
			}
		}
		t += 1;
		

	}while(t < 3000);
}
}