public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int x;
		int y;

		while(true){
			x = sc.nextInt();
			y = sc.nextInt();
			if (x == 0 && y == 0) { break; }
			if (x > y) {
				int z = x;
				x = y;
				y = z;
			}
			sb.append(x).append(" ").append(y).append("\n");
		}
		System.out.print(sb.toString());
	}
} public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int x;
		int y;

		while(true){
			x = sc.nextInt();
			y = sc.nextInt();
			if (x == 0 && y == 0) { break; }
			if (x > y) {
				int z = x;
				x = y;
				y = z;
			}
			sb.append(x).append(" ").append(y).append("\n");
		}
		System.out.print(sb.toString());
	}
} Main public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int x;
		int y;

		while(true){
			x = sc.nextInt();
			y = sc.nextInt();
			if (x == 0 && y == 0) { break; }
			if (x > y) {
				int z = x;
				x = y;
				y = z;
			}
			sb.append(x).append(" ").append(y).append("\n");
		}
		System.out.print(sb.toString());
	} main {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int x;
		int y;

		while(true){
			x = sc.nextInt();
			y = sc.nextInt();
			if (x == 0 && y == 0) { break; }
			if (x > y) {
				int z = x;
				x = y;
				y = z;
			}
			sb.append(x).append(" ").append(y).append("\n");
		}
		System.out.print(sb.toString());
	} java.util.Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int x; x int y; y while(true){
			x = sc.nextInt();
			y = sc.nextInt();
			if (x == 0 && y == 0) { break; }
			if (x > y) {
				int z = x;
				x = y;
				y = z;
			}
			sb.append(x).append(" ").append(y).append("\n");
		} true {
			x = sc.nextInt();
			y = sc.nextInt();
			if (x == 0 && y == 0) { break; }
			if (x > y) {
				int z = x;
				x = y;
				y = z;
			}
			sb.append(x).append(" ").append(y).append("\n");
		} x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc if (x == 0 && y == 0) { break; } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 { break; } break; if (x > y) {
				int z = x;
				x = y;
				y = z;
			} x > y x y {
				int z = x;
				x = y;
				y = z;
			} int z = x; z x x = y x y y = z y z sb.append(x).append(" ").append(y).append("\n") sb.append(x).append(" ").append(y).append sb.append(x).append(" ").append(y) sb.append(x).append(" ").append sb.append(x).append(" ") sb.append(x).append sb.append(x) sb.append sb x " " y "\n" System.out.print(sb.toString()) System.out.print System.out System System.out sb.toString() sb.toString sb String[] args args public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int x;
		int y;

		while(true){
			x = sc.nextInt();
			y = sc.nextInt();
			if (x == 0 && y == 0) { break; }
			if (x > y) {
				int z = x;
				x = y;
				y = z;
			}
			sb.append(x).append(" ").append(y).append("\n");
		}
		System.out.print(sb.toString());
	}
} public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int x;
		int y;

		while(true){
			x = sc.nextInt();
			y = sc.nextInt();
			if (x == 0 && y == 0) { break; }
			if (x > y) {
				int z = x;
				x = y;
				y = z;
			}
			sb.append(x).append(" ").append(y).append("\n");
		}
		System.out.print(sb.toString());
	}
} Main
public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int x;
		int y;

		while(true){
			x = sc.nextInt();
			y = sc.nextInt();
			if (x == 0 && y == 0) { break; }
			if (x > y) {
				int z = x;
				x = y;
				y = z;
			}
			sb.append(x).append(" ").append(y).append("\n");
		}
		System.out.print(sb.toString());
	}
}