
import java.util.Scanner;
import java.util.ArrayList;

public class Main {
	public static void main(String[] args) {
		int x, y, w, j, i = 0;
		ArrayList<Integer> X = new ArrayList<Integer>();
		ArrayList<Integer> Y = new ArrayList<Integer>();
		Scanner sc = new Scanner(System.in);
		while(i < 10000){
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0)
				break;
			else if(x > y){
				w = x;
				x = y;
				y = w;
			}
			X.add(new Integer(x));
			Y.add(new Integer(y));
			i++;
		}
		j = i;
		for(i = 0; i != j; i++){
			System.out.println(X.get(new Integer(i)) + " " + Y.get(new Integer(i)));
		}
	
	}
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {
	public static void main(String[] args) {
		int x, y, w, j, i = 0;
		ArrayList<Integer> X = new ArrayList<Integer>();
		ArrayList<Integer> Y = new ArrayList<Integer>();
		Scanner sc = new Scanner(System.in);
		while(i < 10000){
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0)
				break;
			else if(x > y){
				w = x;
				x = y;
				y = w;
			}
			X.add(new Integer(x));
			Y.add(new Integer(y));
			i++;
		}
		j = i;
		for(i = 0; i != j; i++){
			System.out.println(X.get(new Integer(i)) + " " + Y.get(new Integer(i)));
		}
	
	}
} Main public static void main(String[] args) {
		int x, y, w, j, i = 0;
		ArrayList<Integer> X = new ArrayList<Integer>();
		ArrayList<Integer> Y = new ArrayList<Integer>();
		Scanner sc = new Scanner(System.in);
		while(i < 10000){
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0)
				break;
			else if(x > y){
				w = x;
				x = y;
				y = w;
			}
			X.add(new Integer(x));
			Y.add(new Integer(y));
			i++;
		}
		j = i;
		for(i = 0; i != j; i++){
			System.out.println(X.get(new Integer(i)) + " " + Y.get(new Integer(i)));
		}
	
	} main {
		int x, y, w, j, i = 0;
		ArrayList<Integer> X = new ArrayList<Integer>();
		ArrayList<Integer> Y = new ArrayList<Integer>();
		Scanner sc = new Scanner(System.in);
		while(i < 10000){
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0)
				break;
			else if(x > y){
				w = x;
				x = y;
				y = w;
			}
			X.add(new Integer(x));
			Y.add(new Integer(y));
			i++;
		}
		j = i;
		for(i = 0; i != j; i++){
			System.out.println(X.get(new Integer(i)) + " " + Y.get(new Integer(i)));
		}
	
	} int x x y y w w j j i = 0; i 0 ArrayList<Integer> X = new ArrayList<Integer>(); X new ArrayList<Integer>() ArrayList<Integer> Y = new ArrayList<Integer>(); Y new ArrayList<Integer>() Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(i < 10000){
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0)
				break;
			else if(x > y){
				w = x;
				x = y;
				y = w;
			}
			X.add(new Integer(x));
			Y.add(new Integer(y));
			i++;
		} i < 10000 i 10000 {
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0)
				break;
			else if(x > y){
				w = x;
				x = y;
				y = w;
			}
			X.add(new Integer(x));
			Y.add(new Integer(y));
			i++;
		} x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc if(x == 0 && y == 0)
				break;
			else if(x > y){
				w = x;
				x = y;
				y = w;
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 break; if(x > y){
				w = x;
				x = y;
				y = w;
			} x > y x y {
				w = x;
				x = y;
				y = w;
			} w = x w x x = y x y y = w y w X.add(new Integer(x)) X.add X new Integer(x) Y.add(new Integer(y)) Y.add Y new Integer(y) i++ i j = i j i for(i = 0; i != j; i++){
			System.out.println(X.get(new Integer(i)) + " " + Y.get(new Integer(i)));
		} i = 0; i = 0 i 0 i != j i j i++ i++ i {
			System.out.println(X.get(new Integer(i)) + " " + Y.get(new Integer(i)));
		} {
			System.out.println(X.get(new Integer(i)) + " " + Y.get(new Integer(i)));
		} System.out.println(X.get(new Integer(i)) + " " + Y.get(new Integer(i))) System.out.println System.out System System.out X.get(new Integer(i)) + " " + Y.get(new Integer(i)) X.get(new Integer(i)) + " " + Y.get(new Integer(i)) X.get(new Integer(i)) X.get X new Integer(i) " " Y.get(new Integer(i)) Y.get Y new Integer(i) String[] args args public class Main {
	public static void main(String[] args) {
		int x, y, w, j, i = 0;
		ArrayList<Integer> X = new ArrayList<Integer>();
		ArrayList<Integer> Y = new ArrayList<Integer>();
		Scanner sc = new Scanner(System.in);
		while(i < 10000){
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0)
				break;
			else if(x > y){
				w = x;
				x = y;
				y = w;
			}
			X.add(new Integer(x));
			Y.add(new Integer(y));
			i++;
		}
		j = i;
		for(i = 0; i != j; i++){
			System.out.println(X.get(new Integer(i)) + " " + Y.get(new Integer(i)));
		}
	
	}
} public class Main {
	public static void main(String[] args) {
		int x, y, w, j, i = 0;
		ArrayList<Integer> X = new ArrayList<Integer>();
		ArrayList<Integer> Y = new ArrayList<Integer>();
		Scanner sc = new Scanner(System.in);
		while(i < 10000){
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0)
				break;
			else if(x > y){
				w = x;
				x = y;
				y = w;
			}
			X.add(new Integer(x));
			Y.add(new Integer(y));
			i++;
		}
		j = i;
		for(i = 0; i != j; i++){
			System.out.println(X.get(new Integer(i)) + " " + Y.get(new Integer(i)));
		}
	
	}
} Main

import java.util.Scanner;
import java.util.ArrayList;

public class Main {
	public static void main(String[] args) {
		int x, y, w, j, i = 0;
		ArrayList<Integer> X = new ArrayList<Integer>();
		ArrayList<Integer> Y = new ArrayList<Integer>();
		Scanner sc = new Scanner(System.in);
		while(i < 10000){
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0)
				break;
			else if(x > y){
				w = x;
				x = y;
				y = w;
			}
			X.add(new Integer(x));
			Y.add(new Integer(y));
			i++;
		}
		j = i;
		for(i = 0; i != j; i++){
			System.out.println(X.get(new Integer(i)) + " " + Y.get(new Integer(i)));
		}
	
	}
}