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