import java.util.Scanner;

class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		
		while (true) {
			int x = Integer.parseInt(scan.next());
			int y = Integer.parseInt(scan.next());
			
			if (x == 0 && y == 0) {
				break;
			}
			
			if (x > y) {
				int tmp = x;
				x = y;
				y = tmp;
			}
			
			System.out.println(x + " " + y);
		}
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		
		while (true) {
			int x = Integer.parseInt(scan.next());
			int y = Integer.parseInt(scan.next());
			
			if (x == 0 && y == 0) {
				break;
			}
			
			if (x > y) {
				int tmp = x;
				x = y;
				y = tmp;
			}
			
			System.out.println(x + " " + y);
		}
	}
} Main public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		
		while (true) {
			int x = Integer.parseInt(scan.next());
			int y = Integer.parseInt(scan.next());
			
			if (x == 0 && y == 0) {
				break;
			}
			
			if (x > y) {
				int tmp = x;
				x = y;
				y = tmp;
			}
			
			System.out.println(x + " " + y);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		
		while (true) {
			int x = Integer.parseInt(scan.next());
			int y = Integer.parseInt(scan.next());
			
			if (x == 0 && y == 0) {
				break;
			}
			
			if (x > y) {
				int tmp = x;
				x = y;
				y = tmp;
			}
			
			System.out.println(x + " " + y);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while (true) {
			int x = Integer.parseInt(scan.next());
			int y = Integer.parseInt(scan.next());
			
			if (x == 0 && y == 0) {
				break;
			}
			
			if (x > y) {
				int tmp = x;
				x = y;
				y = tmp;
			}
			
			System.out.println(x + " " + y);
		} true {
			int x = Integer.parseInt(scan.next());
			int y = Integer.parseInt(scan.next());
			
			if (x == 0 && y == 0) {
				break;
			}
			
			if (x > y) {
				int tmp = x;
				x = y;
				y = tmp;
			}
			
			System.out.println(x + " " + y);
		} int x = Integer.parseInt(scan.next()); x Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int y = Integer.parseInt(scan.next()); y Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan if (x == 0 && y == 0) {
				break;
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				break;
			} 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
import java.util.Scanner;

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