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

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

		ArrayList<Integer> numList1 = new ArrayList<Integer>();
		ArrayList<Integer> numList2 = new ArrayList<Integer>();

		while (true) {
			String[] lines = sc.nextLine().split(" ");
			int num1 = Integer.parseInt(lines[0]);
			int num2 = Integer.parseInt(lines[1]);
			if(num1 == 0 && num2 == 0) {
				break;
			} else {
				numList1.add(num1);
				numList2.add(num2);
			}
		}
		for(int i = 0;i < numList1.size();i++) {
			if(numList1.get(i) > numList2.get(i)) {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			}
			System.out.println(numList1.get(i) + " " + numList2.get(i));
		}
		sc.close();
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		ArrayList<Integer> numList1 = new ArrayList<Integer>();
		ArrayList<Integer> numList2 = new ArrayList<Integer>();

		while (true) {
			String[] lines = sc.nextLine().split(" ");
			int num1 = Integer.parseInt(lines[0]);
			int num2 = Integer.parseInt(lines[1]);
			if(num1 == 0 && num2 == 0) {
				break;
			} else {
				numList1.add(num1);
				numList2.add(num2);
			}
		}
		for(int i = 0;i < numList1.size();i++) {
			if(numList1.get(i) > numList2.get(i)) {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			}
			System.out.println(numList1.get(i) + " " + numList2.get(i));
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		ArrayList<Integer> numList1 = new ArrayList<Integer>();
		ArrayList<Integer> numList2 = new ArrayList<Integer>();

		while (true) {
			String[] lines = sc.nextLine().split(" ");
			int num1 = Integer.parseInt(lines[0]);
			int num2 = Integer.parseInt(lines[1]);
			if(num1 == 0 && num2 == 0) {
				break;
			} else {
				numList1.add(num1);
				numList2.add(num2);
			}
		}
		for(int i = 0;i < numList1.size();i++) {
			if(numList1.get(i) > numList2.get(i)) {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			}
			System.out.println(numList1.get(i) + " " + numList2.get(i));
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		ArrayList<Integer> numList1 = new ArrayList<Integer>();
		ArrayList<Integer> numList2 = new ArrayList<Integer>();

		while (true) {
			String[] lines = sc.nextLine().split(" ");
			int num1 = Integer.parseInt(lines[0]);
			int num2 = Integer.parseInt(lines[1]);
			if(num1 == 0 && num2 == 0) {
				break;
			} else {
				numList1.add(num1);
				numList2.add(num2);
			}
		}
		for(int i = 0;i < numList1.size();i++) {
			if(numList1.get(i) > numList2.get(i)) {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			}
			System.out.println(numList1.get(i) + " " + numList2.get(i));
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Integer> numList1 = new ArrayList<Integer>(); numList1 new ArrayList<Integer>() ArrayList<Integer> numList2 = new ArrayList<Integer>(); numList2 new ArrayList<Integer>() while (true) {
			String[] lines = sc.nextLine().split(" ");
			int num1 = Integer.parseInt(lines[0]);
			int num2 = Integer.parseInt(lines[1]);
			if(num1 == 0 && num2 == 0) {
				break;
			} else {
				numList1.add(num1);
				numList2.add(num2);
			}
		} true {
			String[] lines = sc.nextLine().split(" ");
			int num1 = Integer.parseInt(lines[0]);
			int num2 = Integer.parseInt(lines[1]);
			if(num1 == 0 && num2 == 0) {
				break;
			} else {
				numList1.add(num1);
				numList2.add(num2);
			}
		} String[] lines = sc.nextLine().split(" "); lines sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int num1 = Integer.parseInt(lines[0]); num1 Integer.parseInt(lines[0]) Integer.parseInt Integer lines[0] lines 0 int num2 = Integer.parseInt(lines[1]); num2 Integer.parseInt(lines[1]) Integer.parseInt Integer lines[1] lines 1 if(num1 == 0 && num2 == 0) {
				break;
			} else {
				numList1.add(num1);
				numList2.add(num2);
			} num1 == 0 && num2 == 0 num1 == 0 num1 0 num2 == 0 num2 0 {
				break;
			} break; {
				numList1.add(num1);
				numList2.add(num2);
			} numList1.add(num1) numList1.add numList1 num1 numList2.add(num2) numList2.add numList2 num2 for(int i = 0;i < numList1.size();i++) {
			if(numList1.get(i) > numList2.get(i)) {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			}
			System.out.println(numList1.get(i) + " " + numList2.get(i));
		} int i = 0; int i = 0; i 0 i < numList1.size() i numList1.size() numList1.size numList1 i++ i++ i {
			if(numList1.get(i) > numList2.get(i)) {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			}
			System.out.println(numList1.get(i) + " " + numList2.get(i));
		} {
			if(numList1.get(i) > numList2.get(i)) {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			}
			System.out.println(numList1.get(i) + " " + numList2.get(i));
		} if(numList1.get(i) > numList2.get(i)) {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			} numList1.get(i) > numList2.get(i) numList1.get(i) numList1.get numList1 i numList2.get(i) numList2.get numList2 i {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			} int x = numList1.get(i); x numList1.get(i) numList1.get numList1 i numList1.set(i, numList2.get(i)) numList1.set numList1 i numList2.get(i) numList2.get numList2 i numList2.set(i, x) numList2.set numList2 i x System.out.println(numList1.get(i) + " " + numList2.get(i)) System.out.println System.out System System.out numList1.get(i) + " " + numList2.get(i) numList1.get(i) + " " + numList2.get(i) numList1.get(i) numList1.get numList1 i " " numList2.get(i) numList2.get numList2 i sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		ArrayList<Integer> numList1 = new ArrayList<Integer>();
		ArrayList<Integer> numList2 = new ArrayList<Integer>();

		while (true) {
			String[] lines = sc.nextLine().split(" ");
			int num1 = Integer.parseInt(lines[0]);
			int num2 = Integer.parseInt(lines[1]);
			if(num1 == 0 && num2 == 0) {
				break;
			} else {
				numList1.add(num1);
				numList2.add(num2);
			}
		}
		for(int i = 0;i < numList1.size();i++) {
			if(numList1.get(i) > numList2.get(i)) {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			}
			System.out.println(numList1.get(i) + " " + numList2.get(i));
		}
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		ArrayList<Integer> numList1 = new ArrayList<Integer>();
		ArrayList<Integer> numList2 = new ArrayList<Integer>();

		while (true) {
			String[] lines = sc.nextLine().split(" ");
			int num1 = Integer.parseInt(lines[0]);
			int num2 = Integer.parseInt(lines[1]);
			if(num1 == 0 && num2 == 0) {
				break;
			} else {
				numList1.add(num1);
				numList2.add(num2);
			}
		}
		for(int i = 0;i < numList1.size();i++) {
			if(numList1.get(i) > numList2.get(i)) {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			}
			System.out.println(numList1.get(i) + " " + numList2.get(i));
		}
		sc.close();
	}
} Main
import java.util.ArrayList;
import java.util.Scanner;

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

		ArrayList<Integer> numList1 = new ArrayList<Integer>();
		ArrayList<Integer> numList2 = new ArrayList<Integer>();

		while (true) {
			String[] lines = sc.nextLine().split(" ");
			int num1 = Integer.parseInt(lines[0]);
			int num2 = Integer.parseInt(lines[1]);
			if(num1 == 0 && num2 == 0) {
				break;
			} else {
				numList1.add(num1);
				numList2.add(num2);
			}
		}
		for(int i = 0;i < numList1.size();i++) {
			if(numList1.get(i) > numList2.get(i)) {
				int x = numList1.get(i);
				numList1.set(i, numList2.get(i));
				numList2.set(i, x);
			}
			System.out.println(numList1.get(i) + " " + numList2.get(i));
		}
		sc.close();
	}
}