import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int x, y, box = 0;
		while (true) {
			x = stdIn.nextInt();
			y = stdIn.nextInt();
			if(x == 0 && y == 0)break;
			if (x > y) {
				box = x;
				x = y;
				y = box;
			}
			System.out.println(x + " " + y);
		}

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

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

	} main {
		Scanner stdIn = new Scanner(System.in);
		int x, y, box = 0;
		while (true) {
			x = stdIn.nextInt();
			y = stdIn.nextInt();
			if(x == 0 && y == 0)break;
			if (x > y) {
				box = x;
				x = y;
				y = box;
			}
			System.out.println(x + " " + y);
		}

	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int x x y y box = 0; box 0 while (true) {
			x = stdIn.nextInt();
			y = stdIn.nextInt();
			if(x == 0 && y == 0)break;
			if (x > y) {
				box = x;
				x = y;
				y = box;
			}
			System.out.println(x + " " + y);
		} true {
			x = stdIn.nextInt();
			y = stdIn.nextInt();
			if(x == 0 && y == 0)break;
			if (x > y) {
				box = x;
				x = y;
				y = box;
			}
			System.out.println(x + " " + y);
		} x = stdIn.nextInt() x stdIn.nextInt() stdIn.nextInt stdIn y = stdIn.nextInt() y stdIn.nextInt() stdIn.nextInt stdIn if(x == 0 && y == 0)break; x == 0 && y == 0 x == 0 x 0 y == 0 y 0 break; if (x > y) {
				box = x;
				x = y;
				y = box;
			} x > y x y {
				box = x;
				x = y;
				y = box;
			} box = x box x x = y x y y = box y box 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 stdIn = new Scanner(System.in);
		int x, y, box = 0;
		while (true) {
			x = stdIn.nextInt();
			y = stdIn.nextInt();
			if(x == 0 && y == 0)break;
			if (x > y) {
				box = x;
				x = y;
				y = box;
			}
			System.out.println(x + " " + y);
		}

	}
} public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int x, y, box = 0;
		while (true) {
			x = stdIn.nextInt();
			y = stdIn.nextInt();
			if(x == 0 && y == 0)break;
			if (x > y) {
				box = x;
				x = y;
				y = box;
			}
			System.out.println(x + " " + y);
		}

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int x, y, box = 0;
		while (true) {
			x = stdIn.nextInt();
			y = stdIn.nextInt();
			if(x == 0 && y == 0)break;
			if (x > y) {
				box = x;
				x = y;
				y = box;
			}
			System.out.println(x + " " + y);
		}

	}
}