import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try {
			Scanner sc = new Scanner(System.in);
			while (sc.hasNext()) {
				int x = Integer.parseInt(sc.next());
				int y = Integer.parseInt(sc.next());
				if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			sc.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		try {
			Scanner sc = new Scanner(System.in);
			while (sc.hasNext()) {
				int x = Integer.parseInt(sc.next());
				int y = Integer.parseInt(sc.next());
				if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			sc.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
} Main public static void main(String[] args) {
		try {
			Scanner sc = new Scanner(System.in);
			while (sc.hasNext()) {
				int x = Integer.parseInt(sc.next());
				int y = Integer.parseInt(sc.next());
				if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			sc.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	} main {
		try {
			Scanner sc = new Scanner(System.in);
			while (sc.hasNext()) {
				int x = Integer.parseInt(sc.next());
				int y = Integer.parseInt(sc.next());
				if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			sc.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	} try {
			Scanner sc = new Scanner(System.in);
			while (sc.hasNext()) {
				int x = Integer.parseInt(sc.next());
				int y = Integer.parseInt(sc.next());
				if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			sc.close();
		} catch (Exception e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		} Exception e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			Scanner sc = new Scanner(System.in);
			while (sc.hasNext()) {
				int x = Integer.parseInt(sc.next());
				int y = Integer.parseInt(sc.next());
				if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			sc.close();
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
				int x = Integer.parseInt(sc.next());
				int y = Integer.parseInt(sc.next());
				if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			} sc.hasNext() sc.hasNext sc {
				int x = Integer.parseInt(sc.next());
				int y = Integer.parseInt(sc.next());
				if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			} int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int y = Integer.parseInt(sc.next()); y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
					break;
				} break; if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				} x < y x y {
					System.out.println(x + " " + y);
				} System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y {
					System.out.println(y + " " + x);
				} System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		try {
			Scanner sc = new Scanner(System.in);
			while (sc.hasNext()) {
				int x = Integer.parseInt(sc.next());
				int y = Integer.parseInt(sc.next());
				if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			sc.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
} public class Main {
	public static void main(String[] args) {
		try {
			Scanner sc = new Scanner(System.in);
			while (sc.hasNext()) {
				int x = Integer.parseInt(sc.next());
				int y = Integer.parseInt(sc.next());
				if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			sc.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try {
			Scanner sc = new Scanner(System.in);
			while (sc.hasNext()) {
				int x = Integer.parseInt(sc.next());
				int y = Integer.parseInt(sc.next());
				if (x == 0 && y == 0) {
					break;
				} else if (x < y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			sc.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}