import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		for (int i = 1; i > 0; i++){
		int x = scan.nextInt(); //????????§???????????\???
		int y = scan.nextInt(); //????????§???????????\???
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
			System.out.println(y + " " + x);
		} else{
			System.out.println(x + " " + y);
		}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		for (int i = 1; i > 0; i++){
		int x = scan.nextInt(); //????????§???????????\???
		int y = scan.nextInt(); //????????§???????????\???
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
			System.out.println(y + " " + x);
		} else{
			System.out.println(x + " " + y);
		}
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		for (int i = 1; i > 0; i++){
		int x = scan.nextInt(); //????????§???????????\???
		int y = scan.nextInt(); //????????§???????????\???
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
			System.out.println(y + " " + x);
		} else{
			System.out.println(x + " " + y);
		}
		}
	} main {
		Scanner scan = new Scanner(System.in);
		for (int i = 1; i > 0; i++){
		int x = scan.nextInt(); //????????§???????????\???
		int y = scan.nextInt(); //????????§???????????\???
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
			System.out.println(y + " " + x);
		} else{
			System.out.println(x + " " + y);
		}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) for (int i = 1; i > 0; i++){
		int x = scan.nextInt(); //????????§???????????\???
		int y = scan.nextInt(); //????????§???????????\???
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
			System.out.println(y + " " + x);
		} else{
			System.out.println(x + " " + y);
		}
		} int i = 1; int i = 1; i 1 i > 0 i 0 i++ i++ i {
		int x = scan.nextInt(); //????????§???????????\???
		int y = scan.nextInt(); //????????§???????????\???
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
			System.out.println(y + " " + x);
		} else{
			System.out.println(x + " " + y);
		}
		} {
		int x = scan.nextInt(); //????????§???????????\???
		int y = scan.nextInt(); //????????§???????????\???
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
			System.out.println(y + " " + x);
		} else{
			System.out.println(x + " " + y);
		}
		} int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan 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(y + " " + x);
		} else{
			System.out.println(x + " " + y);
		} x > y x y {
			System.out.println(y + " " + x);
		} System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x {
			System.out.println(x + " " + y);
		} System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		for (int i = 1; i > 0; i++){
		int x = scan.nextInt(); //????????§???????????\???
		int y = scan.nextInt(); //????????§???????????\???
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
			System.out.println(y + " " + x);
		} else{
			System.out.println(x + " " + y);
		}
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		for (int i = 1; i > 0; i++){
		int x = scan.nextInt(); //????????§???????????\???
		int y = scan.nextInt(); //????????§???????????\???
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
			System.out.println(y + " " + x);
		} else{
			System.out.println(x + " " + y);
		}
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		for (int i = 1; i > 0; i++){
		int x = scan.nextInt(); //????????§???????????\???
		int y = scan.nextInt(); //????????§???????????\???
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
			System.out.println(y + " " + x);
		} else{
			System.out.println(x + " " + y);
		}
		}
	}
}