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 IOException {
		int count = 3000; // ?????§???????????°(??????)
		int t = 0;//?????????????????°
		int temp = 0;
		int flag = 0;
		String str;
		String[] convert = new String[2];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> compare = new ArrayList<Integer>();
		/**
		 * ???????????\???
		 */
		while (t != count) { // ?????§3000???
			str = br.readLine();
			if(str.equals("0 0")){ // "0 0"??§??????
				break;
			}
			convert = str.split(" ", 0);
			for(int j = 0; j < 2; ++j){
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			}
			++t;
			}
		int length = compare.size();
		/**
		 * ??¨?????????
		 */
		if(flag == 0){
		for(int i = 0; i < length; i+=2){
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		}
		}
	}

} 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 IOException {
		int count = 3000; // ?????§???????????°(??????)
		int t = 0;//?????????????????°
		int temp = 0;
		int flag = 0;
		String str;
		String[] convert = new String[2];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> compare = new ArrayList<Integer>();
		/**
		 * ???????????\???
		 */
		while (t != count) { // ?????§3000???
			str = br.readLine();
			if(str.equals("0 0")){ // "0 0"??§??????
				break;
			}
			convert = str.split(" ", 0);
			for(int j = 0; j < 2; ++j){
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			}
			++t;
			}
		int length = compare.size();
		/**
		 * ??¨?????????
		 */
		if(flag == 0){
		for(int i = 0; i < length; i+=2){
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		}
		}
	}

} Main public static void main(String[] args) throws IOException {
		int count = 3000; // ?????§???????????°(??????)
		int t = 0;//?????????????????°
		int temp = 0;
		int flag = 0;
		String str;
		String[] convert = new String[2];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> compare = new ArrayList<Integer>();
		/**
		 * ???????????\???
		 */
		while (t != count) { // ?????§3000???
			str = br.readLine();
			if(str.equals("0 0")){ // "0 0"??§??????
				break;
			}
			convert = str.split(" ", 0);
			for(int j = 0; j < 2; ++j){
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			}
			++t;
			}
		int length = compare.size();
		/**
		 * ??¨?????????
		 */
		if(flag == 0){
		for(int i = 0; i < length; i+=2){
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		}
		}
	} main {
		int count = 3000; // ?????§???????????°(??????)
		int t = 0;//?????????????????°
		int temp = 0;
		int flag = 0;
		String str;
		String[] convert = new String[2];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> compare = new ArrayList<Integer>();
		/**
		 * ???????????\???
		 */
		while (t != count) { // ?????§3000???
			str = br.readLine();
			if(str.equals("0 0")){ // "0 0"??§??????
				break;
			}
			convert = str.split(" ", 0);
			for(int j = 0; j < 2; ++j){
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			}
			++t;
			}
		int length = compare.size();
		/**
		 * ??¨?????????
		 */
		if(flag == 0){
		for(int i = 0; i < length; i+=2){
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		}
		}
	} int count = 3000; count 3000 int t = 0; t 0 int temp = 0; temp 0 int flag = 0; flag 0 String str; str String[] convert = new String[2]; convert new String[2] 2 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) ArrayList<Integer> compare = new ArrayList<Integer>(); compare new ArrayList<Integer>() while (t != count) { // ?????§3000???
			str = br.readLine();
			if(str.equals("0 0")){ // "0 0"??§??????
				break;
			}
			convert = str.split(" ", 0);
			for(int j = 0; j < 2; ++j){
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			}
			++t;
			} t != count t count { // ?????§3000???
			str = br.readLine();
			if(str.equals("0 0")){ // "0 0"??§??????
				break;
			}
			convert = str.split(" ", 0);
			for(int j = 0; j < 2; ++j){
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			}
			++t;
			} str = br.readLine() str br.readLine() br.readLine br if(str.equals("0 0")){ // "0 0"??§??????
				break;
			} str.equals("0 0") str.equals str "0 0" { // "0 0"??§??????
				break;
			} break; convert = str.split(" ", 0) convert str.split(" ", 0) str.split str " " 0 for(int j = 0; j < 2; ++j){
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			} int j = 0; int j = 0; j 0 j < 2 j 2 ++j ++j j {
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			} {
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			} temp = Integer.parseInt(convert[j]) temp Integer.parseInt(convert[j]) Integer.parseInt Integer convert[j] convert j if(temp < 0 || temp >10000){
					flag = 1;
					break;
				} temp < 0 || temp >10000 temp < 0 temp 0 temp >10000 temp 10000 {
					flag = 1;
					break;
				} flag = 1 flag 1 break; compare.add(temp) compare.add compare temp ++t t int length = compare.size(); length compare.size() compare.size compare if(flag == 0){
		for(int i = 0; i < length; i+=2){
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		}
		} flag == 0 flag 0 {
		for(int i = 0; i < length; i+=2){
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		}
		} for(int i = 0; i < length; i+=2){
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		} int i = 0; int i = 0; i 0 i < length i length i+=2 i+=2 i 2 {
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		} {
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		} if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			} compare.get(i) > compare.get(i+1) compare.get(i) compare.get compare i compare.get(i+1) compare.get compare i+1 i 1 {
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			} System.out.println(compare.get(i+1)+" "+compare.get(i)) System.out.println System.out System System.out compare.get(i+1)+" "+compare.get(i) compare.get(i+1)+" "+compare.get(i) compare.get(i+1) compare.get compare i+1 i 1 " " compare.get(i) compare.get compare i if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			} compare.get(i) < compare.get(i+1) compare.get(i) compare.get compare i compare.get(i+1) compare.get compare i+1 i 1 {
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			} System.out.println(compare.get(i)+" "+compare.get(i+1)) System.out.println System.out System System.out compare.get(i)+" "+compare.get(i+1) compare.get(i)+" "+compare.get(i+1) compare.get(i) compare.get compare i " " compare.get(i+1) compare.get compare i+1 i 1 {
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			} System.out.println(compare.get(i)+" "+compare.get(i+1)) System.out.println System.out System System.out compare.get(i)+" "+compare.get(i+1) compare.get(i)+" "+compare.get(i+1) compare.get(i) compare.get compare i " " compare.get(i+1) compare.get compare i+1 i 1 String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		int count = 3000; // ?????§???????????°(??????)
		int t = 0;//?????????????????°
		int temp = 0;
		int flag = 0;
		String str;
		String[] convert = new String[2];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> compare = new ArrayList<Integer>();
		/**
		 * ???????????\???
		 */
		while (t != count) { // ?????§3000???
			str = br.readLine();
			if(str.equals("0 0")){ // "0 0"??§??????
				break;
			}
			convert = str.split(" ", 0);
			for(int j = 0; j < 2; ++j){
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			}
			++t;
			}
		int length = compare.size();
		/**
		 * ??¨?????????
		 */
		if(flag == 0){
		for(int i = 0; i < length; i+=2){
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		}
		}
	}

} public class Main {
	public static void main(String[] args) throws IOException {
		int count = 3000; // ?????§???????????°(??????)
		int t = 0;//?????????????????°
		int temp = 0;
		int flag = 0;
		String str;
		String[] convert = new String[2];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> compare = new ArrayList<Integer>();
		/**
		 * ???????????\???
		 */
		while (t != count) { // ?????§3000???
			str = br.readLine();
			if(str.equals("0 0")){ // "0 0"??§??????
				break;
			}
			convert = str.split(" ", 0);
			for(int j = 0; j < 2; ++j){
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			}
			++t;
			}
		int length = compare.size();
		/**
		 * ??¨?????????
		 */
		if(flag == 0){
		for(int i = 0; i < length; i+=2){
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		}
		}
	}

} 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 IOException {
		int count = 3000; // ?????§???????????°(??????)
		int t = 0;//?????????????????°
		int temp = 0;
		int flag = 0;
		String str;
		String[] convert = new String[2];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> compare = new ArrayList<Integer>();
		/**
		 * ???????????\???
		 */
		while (t != count) { // ?????§3000???
			str = br.readLine();
			if(str.equals("0 0")){ // "0 0"??§??????
				break;
			}
			convert = str.split(" ", 0);
			for(int j = 0; j < 2; ++j){
				temp = Integer.parseInt(convert[j]);
				if(temp < 0 || temp >10000){
					flag = 1;
					break;
				}
				compare.add(temp);
			}
			++t;
			}
		int length = compare.size();
		/**
		 * ??¨?????????
		 */
		if(flag == 0){
		for(int i = 0; i < length; i+=2){
			if(compare.get(i) > compare.get(i+1)){
				System.out.println(compare.get(i+1)+" "+compare.get(i));
			}
			else if(compare.get(i) < compare.get(i+1)){
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
			else{
				System.out.println(compare.get(i)+" "+compare.get(i+1));
			}
		}
		}
	}

}