import java.util.Scanner;

class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		StringBuilder str = new StringBuilder();
		
		int tmp;
		
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			
			if (x > y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			if (x == 0 && y == 0)
				break;
			str.append(x + " " + y + "\n");
		}

		System.out.print(str);

	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		StringBuilder str = new StringBuilder();
		
		int tmp;
		
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			
			if (x > y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			if (x == 0 && y == 0)
				break;
			str.append(x + " " + y + "\n");
		}

		System.out.print(str);

	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		StringBuilder str = new StringBuilder();
		
		int tmp;
		
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			
			if (x > y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			if (x == 0 && y == 0)
				break;
			str.append(x + " " + y + "\n");
		}

		System.out.print(str);

	} main {

		Scanner scan = new Scanner(System.in);
		StringBuilder str = new StringBuilder();
		
		int tmp;
		
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			
			if (x > y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			if (x == 0 && y == 0)
				break;
			str.append(x + " " + y + "\n");
		}

		System.out.print(str);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) StringBuilder str = new StringBuilder(); str new StringBuilder() int tmp; tmp while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			
			if (x > y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			if (x == 0 && y == 0)
				break;
			str.append(x + " " + y + "\n");
		} true {
			int x = scan.nextInt();
			int y = scan.nextInt();
			
			if (x > y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			if (x == 0 && y == 0)
				break;
			str.append(x + " " + y + "\n");
		} int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan if (x > y) {
				tmp = x;
				x = y;
				y = tmp;
			} x > y x y {
				tmp = x;
				x = y;
				y = tmp;
			} tmp = x tmp x x = y x y y = tmp y tmp if (x == 0 && y == 0)
				break; x == 0 && y == 0 x == 0 x 0 y == 0 y 0 break; str.append(x + " " + y + "\n") str.append str x + " " + y + "\n" y x + " " + y + "\n" x " " y "\n" System.out.print(str) System.out.print System.out System System.out str String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		StringBuilder str = new StringBuilder();
		
		int tmp;
		
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			
			if (x > y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			if (x == 0 && y == 0)
				break;
			str.append(x + " " + y + "\n");
		}

		System.out.print(str);

	}
}