import java.util.Scanner;

public class Main {

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

		for (; ;) {
			int x = stdIn.nextInt();
			int y = stdIn.nextInt();
			
			if (x == 0 && y == 0) break;
			
			if (x > y) {
				int t = y;
				y = x;
				x = t;
			}
			
			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);

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

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

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

		for (; ;) {
			int x = stdIn.nextInt();
			int y = stdIn.nextInt();
			
			if (x == 0 && y == 0) break;
			
			if (x > y) {
				int t = y;
				y = x;
				x = t;
			}
			
			System.out.println(x + " " + y);
		}
	}
} public class Main {

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

		for (; ;) {
			int x = stdIn.nextInt();
			int y = stdIn.nextInt();
			
			if (x == 0 && y == 0) break;
			
			if (x > y) {
				int t = y;
				y = x;
				x = t;
			}
			
			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);

		for (; ;) {
			int x = stdIn.nextInt();
			int y = stdIn.nextInt();
			
			if (x == 0 && y == 0) break;
			
			if (x > y) {
				int t = y;
				y = x;
				x = t;
			}
			
			System.out.println(x + " " + y);
		}
	}
}

