import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

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

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

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

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

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

		while (true) {
			int x = sc.nextInt();
			int y = sc.nextInt();
			if (x == 0 && y ==0) {
				sc.close();
				break;
			}
			if (x > y) {
				int tmp = x;
				x = y;
				y = tmp;
			}
			System.out.println(x + " " + y);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		while (true) {
			int x = sc.nextInt();
			int y = sc.nextInt();
			if (x == 0 && y ==0) {
				sc.close();
				break;
			}
			if (x > y) {
				int tmp = x;
				x = y;
				y = tmp;
			}
			System.out.println(x + " " + y);
		}
	}
}