import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader buffReader = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> arrIntA = new ArrayList<Integer>();
		ArrayList<Integer> arrIntB = new ArrayList<Integer>();

		while(true) {
			String[] strNumbers = buffReader.readLine().split(" ");
			int a = Integer.parseInt(strNumbers[0]);
			int b = Integer.parseInt(strNumbers[1]);

			if(a == b && a == 0) break;

			if(b < a) {
				int tmp = a;
				a = b;
				b = tmp;
			}

			arrIntA.add(a);
			arrIntB.add(b);
		}

		for(int i = 0; i < arrIntA.size(); i++) System.out.println(arrIntA.get(i) + " " + arrIntB.get(i));
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader buffReader = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> arrIntA = new ArrayList<Integer>();
		ArrayList<Integer> arrIntB = new ArrayList<Integer>();

		while(true) {
			String[] strNumbers = buffReader.readLine().split(" ");
			int a = Integer.parseInt(strNumbers[0]);
			int b = Integer.parseInt(strNumbers[1]);

			if(a == b && a == 0) break;

			if(b < a) {
				int tmp = a;
				a = b;
				b = tmp;
			}

			arrIntA.add(a);
			arrIntB.add(b);
		}

		for(int i = 0; i < arrIntA.size(); i++) System.out.println(arrIntA.get(i) + " " + arrIntB.get(i));
	}
} Main public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader buffReader = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> arrIntA = new ArrayList<Integer>();
		ArrayList<Integer> arrIntB = new ArrayList<Integer>();

		while(true) {
			String[] strNumbers = buffReader.readLine().split(" ");
			int a = Integer.parseInt(strNumbers[0]);
			int b = Integer.parseInt(strNumbers[1]);

			if(a == b && a == 0) break;

			if(b < a) {
				int tmp = a;
				a = b;
				b = tmp;
			}

			arrIntA.add(a);
			arrIntB.add(b);
		}

		for(int i = 0; i < arrIntA.size(); i++) System.out.println(arrIntA.get(i) + " " + arrIntB.get(i));
	} main {

		BufferedReader buffReader = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> arrIntA = new ArrayList<Integer>();
		ArrayList<Integer> arrIntB = new ArrayList<Integer>();

		while(true) {
			String[] strNumbers = buffReader.readLine().split(" ");
			int a = Integer.parseInt(strNumbers[0]);
			int b = Integer.parseInt(strNumbers[1]);

			if(a == b && a == 0) break;

			if(b < a) {
				int tmp = a;
				a = b;
				b = tmp;
			}

			arrIntA.add(a);
			arrIntB.add(b);
		}

		for(int i = 0; i < arrIntA.size(); i++) System.out.println(arrIntA.get(i) + " " + arrIntB.get(i));
	} BufferedReader buffReader = new BufferedReader(new InputStreamReader(System.in)); buffReader new BufferedReader(new InputStreamReader(System.in)) ArrayList<Integer> arrIntA = new ArrayList<Integer>(); arrIntA new ArrayList<Integer>() ArrayList<Integer> arrIntB = new ArrayList<Integer>(); arrIntB new ArrayList<Integer>() while(true) {
			String[] strNumbers = buffReader.readLine().split(" ");
			int a = Integer.parseInt(strNumbers[0]);
			int b = Integer.parseInt(strNumbers[1]);

			if(a == b && a == 0) break;

			if(b < a) {
				int tmp = a;
				a = b;
				b = tmp;
			}

			arrIntA.add(a);
			arrIntB.add(b);
		} true {
			String[] strNumbers = buffReader.readLine().split(" ");
			int a = Integer.parseInt(strNumbers[0]);
			int b = Integer.parseInt(strNumbers[1]);

			if(a == b && a == 0) break;

			if(b < a) {
				int tmp = a;
				a = b;
				b = tmp;
			}

			arrIntA.add(a);
			arrIntB.add(b);
		} String[] strNumbers = buffReader.readLine().split(" "); strNumbers buffReader.readLine().split(" ") buffReader.readLine().split buffReader.readLine() buffReader.readLine buffReader " " int a = Integer.parseInt(strNumbers[0]); a Integer.parseInt(strNumbers[0]) Integer.parseInt Integer strNumbers[0] strNumbers 0 int b = Integer.parseInt(strNumbers[1]); b Integer.parseInt(strNumbers[1]) Integer.parseInt Integer strNumbers[1] strNumbers 1 if(a == b && a == 0) break; a == b && a == 0 a == b a b a == 0 a 0 break; if(b < a) {
				int tmp = a;
				a = b;
				b = tmp;
			} b < a b a {
				int tmp = a;
				a = b;
				b = tmp;
			} int tmp = a; tmp a a = b a b b = tmp b tmp arrIntA.add(a) arrIntA.add arrIntA a arrIntB.add(b) arrIntB.add arrIntB b for(int i = 0; i < arrIntA.size(); i++) System.out.println(arrIntA.get(i) + " " + arrIntB.get(i)); int i = 0; int i = 0; i 0 i < arrIntA.size() i arrIntA.size() arrIntA.size arrIntA i++ i++ i System.out.println(arrIntA.get(i) + " " + arrIntB.get(i)); System.out.println(arrIntA.get(i) + " " + arrIntB.get(i)) System.out.println System.out System System.out arrIntA.get(i) + " " + arrIntB.get(i) arrIntA.get(i) + " " + arrIntB.get(i) arrIntA.get(i) arrIntA.get arrIntA i " " arrIntB.get(i) arrIntB.get arrIntB i String[] args args public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader buffReader = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> arrIntA = new ArrayList<Integer>();
		ArrayList<Integer> arrIntB = new ArrayList<Integer>();

		while(true) {
			String[] strNumbers = buffReader.readLine().split(" ");
			int a = Integer.parseInt(strNumbers[0]);
			int b = Integer.parseInt(strNumbers[1]);

			if(a == b && a == 0) break;

			if(b < a) {
				int tmp = a;
				a = b;
				b = tmp;
			}

			arrIntA.add(a);
			arrIntB.add(b);
		}

		for(int i = 0; i < arrIntA.size(); i++) System.out.println(arrIntA.get(i) + " " + arrIntB.get(i));
	}
} public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader buffReader = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> arrIntA = new ArrayList<Integer>();
		ArrayList<Integer> arrIntB = new ArrayList<Integer>();

		while(true) {
			String[] strNumbers = buffReader.readLine().split(" ");
			int a = Integer.parseInt(strNumbers[0]);
			int b = Integer.parseInt(strNumbers[1]);

			if(a == b && a == 0) break;

			if(b < a) {
				int tmp = a;
				a = b;
				b = tmp;
			}

			arrIntA.add(a);
			arrIntB.add(b);
		}

		for(int i = 0; i < arrIntA.size(); i++) System.out.println(arrIntA.get(i) + " " + arrIntB.get(i));
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader buffReader = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> arrIntA = new ArrayList<Integer>();
		ArrayList<Integer> arrIntB = new ArrayList<Integer>();

		while(true) {
			String[] strNumbers = buffReader.readLine().split(" ");
			int a = Integer.parseInt(strNumbers[0]);
			int b = Integer.parseInt(strNumbers[1]);

			if(a == b && a == 0) break;

			if(b < a) {
				int tmp = a;
				a = b;
				b = tmp;
			}

			arrIntA.add(a);
			arrIntB.add(b);
		}

		for(int i = 0; i < arrIntA.size(); i++) System.out.println(arrIntA.get(i) + " " + arrIntB.get(i));
	}
}