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

class Main {
	public static void main(String[] args) throws Exception {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		ArrayList<String> list1 = new ArrayList<String>();
		int[] list2 = new int[3001];
		int[] list3 = new int[3001];
		int i = 0;
		while (true) {
			list1.add(br.readLine());

			list2[i] = Integer.parseInt(SubStringStart(list1.get(i)));//???????????°???
			list3[i] = Integer.parseInt(SubStringEnd(list1.get(i)));//????°??????°???
			if (list2[i] == 0 && list3[i] == 0) {
				for (int k = 0; k < list1.size(); k++) {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				}
				break;
			}
			i = i + 1;
		}
	}

	public static String SubStringStart(String str) {
		int index = str.indexOf(" ");
		return (str.substring(0, index));
	}

	public static String SubStringEnd(String str) {
		int index = str.indexOf(" ");
		return (str.substring(index + 1));
	}
}
//class Main {
//	public static void main(String[] args) throws Exception {
//		InputStreamReader is = new InputStreamReader(System.in);
//		BufferedReader br = new BufferedReader(is);
//
//		String[] list1 = new String[3001];
//		int[] list2 = new int[3001];
//		int[] list3 = new int[3001];
//		int i = 0;
//		while (true) {
//			list1[i] = br.readLine();
//
//			list2[i] = Integer.parseInt(SubStringStart(list1[i]));//???????????°???
//			list3[i] = Integer.parseInt(SubStringEnd(list1[i]));//????°??????°???
//			if (list2[i] == 0 || list3[i] == 0) {
//				for (int k = 0; k < list1.length; k++) {
//					if (list2[k] > list3[k]) {
//						System.out.println(list3[k] + " " + list2[k]);
//					} else if(list2[k] < list3[k]){
//						System.out.println(list2[k] + " " + list3[k]);
//					}else if(list2[k] == list3[k]|| list2[k]!=0|| list3[k]!=0){
//						System.out.println(list2[k] + " " + list3[k]);
//					}
//				}
//				break;
//			}
//			i = i + 1;
//		}
//	}
//
//	public static String SubStringStart(String str) {
//		int index = str.indexOf(" ");
//		return (str.substring(0, index));
//	}
//
//	public static String SubStringEnd(String str) {
//		int index = str.indexOf(" ");
//		return (str.substring(index + 1));
//	}
//} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util class Main {
	public static void main(String[] args) throws Exception {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		ArrayList<String> list1 = new ArrayList<String>();
		int[] list2 = new int[3001];
		int[] list3 = new int[3001];
		int i = 0;
		while (true) {
			list1.add(br.readLine());

			list2[i] = Integer.parseInt(SubStringStart(list1.get(i)));//???????????°???
			list3[i] = Integer.parseInt(SubStringEnd(list1.get(i)));//????°??????°???
			if (list2[i] == 0 && list3[i] == 0) {
				for (int k = 0; k < list1.size(); k++) {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				}
				break;
			}
			i = i + 1;
		}
	}

	public static String SubStringStart(String str) {
		int index = str.indexOf(" ");
		return (str.substring(0, index));
	}

	public static String SubStringEnd(String str) {
		int index = str.indexOf(" ");
		return (str.substring(index + 1));
	}
} Main public static void main(String[] args) throws Exception {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		ArrayList<String> list1 = new ArrayList<String>();
		int[] list2 = new int[3001];
		int[] list3 = new int[3001];
		int i = 0;
		while (true) {
			list1.add(br.readLine());

			list2[i] = Integer.parseInt(SubStringStart(list1.get(i)));//???????????°???
			list3[i] = Integer.parseInt(SubStringEnd(list1.get(i)));//????°??????°???
			if (list2[i] == 0 && list3[i] == 0) {
				for (int k = 0; k < list1.size(); k++) {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				}
				break;
			}
			i = i + 1;
		}
	} main {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		ArrayList<String> list1 = new ArrayList<String>();
		int[] list2 = new int[3001];
		int[] list3 = new int[3001];
		int i = 0;
		while (true) {
			list1.add(br.readLine());

			list2[i] = Integer.parseInt(SubStringStart(list1.get(i)));//???????????°???
			list3[i] = Integer.parseInt(SubStringEnd(list1.get(i)));//????°??????°???
			if (list2[i] == 0 && list3[i] == 0) {
				for (int k = 0; k < list1.size(); k++) {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				}
				break;
			}
			i = i + 1;
		}
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) ArrayList<String> list1 = new ArrayList<String>(); list1 new ArrayList<String>() int[] list2 = new int[3001]; list2 new int[3001] 3001 int[] list3 = new int[3001]; list3 new int[3001] 3001 int i = 0; i 0 while (true) {
			list1.add(br.readLine());

			list2[i] = Integer.parseInt(SubStringStart(list1.get(i)));//???????????°???
			list3[i] = Integer.parseInt(SubStringEnd(list1.get(i)));//????°??????°???
			if (list2[i] == 0 && list3[i] == 0) {
				for (int k = 0; k < list1.size(); k++) {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				}
				break;
			}
			i = i + 1;
		} true {
			list1.add(br.readLine());

			list2[i] = Integer.parseInt(SubStringStart(list1.get(i)));//???????????°???
			list3[i] = Integer.parseInt(SubStringEnd(list1.get(i)));//????°??????°???
			if (list2[i] == 0 && list3[i] == 0) {
				for (int k = 0; k < list1.size(); k++) {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				}
				break;
			}
			i = i + 1;
		} list1.add(br.readLine()) list1.add list1 br.readLine() br.readLine br list2[i] = Integer.parseInt(SubStringStart(list1.get(i))) list2[i] list2 i Integer.parseInt(SubStringStart(list1.get(i))) Integer.parseInt Integer SubStringStart(list1.get(i)) SubStringStart list1.get(i) list1.get list1 i list3[i] = Integer.parseInt(SubStringEnd(list1.get(i))) list3[i] list3 i Integer.parseInt(SubStringEnd(list1.get(i))) Integer.parseInt Integer SubStringEnd(list1.get(i)) SubStringEnd list1.get(i) list1.get list1 i if (list2[i] == 0 && list3[i] == 0) {
				for (int k = 0; k < list1.size(); k++) {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				}
				break;
			} list2[i] == 0 && list3[i] == 0 list2[i] == 0 list2[i] list2 i 0 list3[i] == 0 list3[i] list3 i 0 {
				for (int k = 0; k < list1.size(); k++) {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				}
				break;
			} for (int k = 0; k < list1.size(); k++) {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				} int k = 0; int k = 0; k 0 k < list1.size() k list1.size() list1.size list1 k++ k++ k {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				} {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				} if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					} list2[k] > list3[k] list2[k] list2 k list3[k] list3 k {
						System.out.println(list3[k] + " " + list2[k]);
					} System.out.println(list3[k] + " " + list2[k]) System.out.println System.out System System.out list3[k] + " " + list2[k] list3[k] + " " + list2[k] list3[k] list3 k " " list2[k] list2 k if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					} list2[k] < list3[k] list2[k] list2 k list3[k] list3 k {
						System.out.println(list2[k] + " " + list3[k]);
					} System.out.println(list2[k] + " " + list3[k]) System.out.println System.out System System.out list2[k] + " " + list3[k] list2[k] + " " + list3[k] list2[k] list2 k " " list3[k] list3 k if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					} list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0 list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0 list2[k] == list3[k] list2[k] list2 k list3[k] list3 k list2[k] != 0 list2[k] list2 k 0 list3[k] != 0 list3[k] list3 k 0 {
						System.out.println(list2[k] + " " + list3[k]);
					} System.out.println(list2[k] + " " + list3[k]) System.out.println System.out System System.out list2[k] + " " + list3[k] list2[k] + " " + list3[k] list2[k] list2 k " " list3[k] list3 k break; i = i + 1 i i + 1 i 1 String[] args args public static String SubStringStart(String str) {
		int index = str.indexOf(" ");
		return (str.substring(0, index));
	} SubStringStart {
		int index = str.indexOf(" ");
		return (str.substring(0, index));
	} int index = str.indexOf(" "); index str.indexOf(" ") str.indexOf str " " return (str.substring(0, index)); (str.substring(0, index)) str.substring str 0 index String str str public static String SubStringEnd(String str) {
		int index = str.indexOf(" ");
		return (str.substring(index + 1));
	} SubStringEnd {
		int index = str.indexOf(" ");
		return (str.substring(index + 1));
	} int index = str.indexOf(" "); index str.indexOf(" ") str.indexOf str " " return (str.substring(index + 1)); (str.substring(index + 1)) str.substring str index + 1 index 1 String str str
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

class Main {
	public static void main(String[] args) throws Exception {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		ArrayList<String> list1 = new ArrayList<String>();
		int[] list2 = new int[3001];
		int[] list3 = new int[3001];
		int i = 0;
		while (true) {
			list1.add(br.readLine());

			list2[i] = Integer.parseInt(SubStringStart(list1.get(i)));//???????????°???
			list3[i] = Integer.parseInt(SubStringEnd(list1.get(i)));//????°??????°???
			if (list2[i] == 0 && list3[i] == 0) {
				for (int k = 0; k < list1.size(); k++) {
					if (list2[k] > list3[k]) {
						System.out.println(list3[k] + " " + list2[k]);
					} else if (list2[k] < list3[k]) {
						System.out.println(list2[k] + " " + list3[k]);
					} else if (list2[k] == list3[k] && list2[k] != 0 && list3[k] != 0) {
						System.out.println(list2[k] + " " + list3[k]);
					}
				}
				break;
			}
			i = i + 1;
		}
	}

	public static String SubStringStart(String str) {
		int index = str.indexOf(" ");
		return (str.substring(0, index));
	}

	public static String SubStringEnd(String str) {
		int index = str.indexOf(" ");
		return (str.substring(index + 1));
	}
}
//class Main {
//	public static void main(String[] args) throws Exception {
//		InputStreamReader is = new InputStreamReader(System.in);
//		BufferedReader br = new BufferedReader(is);
//
//		String[] list1 = new String[3001];
//		int[] list2 = new int[3001];
//		int[] list3 = new int[3001];
//		int i = 0;
//		while (true) {
//			list1[i] = br.readLine();
//
//			list2[i] = Integer.parseInt(SubStringStart(list1[i]));//???????????°???
//			list3[i] = Integer.parseInt(SubStringEnd(list1[i]));//????°??????°???
//			if (list2[i] == 0 || list3[i] == 0) {
//				for (int k = 0; k < list1.length; k++) {
//					if (list2[k] > list3[k]) {
//						System.out.println(list3[k] + " " + list2[k]);
//					} else if(list2[k] < list3[k]){
//						System.out.println(list2[k] + " " + list3[k]);
//					}else if(list2[k] == list3[k]|| list2[k]!=0|| list3[k]!=0){
//						System.out.println(list2[k] + " " + list3[k]);
//					}
//				}
//				break;
//			}
//			i = i + 1;
//		}
//	}
//
//	public static String SubStringStart(String str) {
//		int index = str.indexOf(" ");
//		return (str.substring(0, index));
//	}
//
//	public static String SubStringEnd(String str) {
//		int index = str.indexOf(" ");
//		return (str.substring(index + 1));
//	}
//}