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{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while (true){
			String str = br.readLine();
			if ("0 0".equals(str)) break;
			list.add(str);
		}
		int swap = 0 ;
		for (int i = 0 ;i < list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int a = Integer.parseInt(stra[0]);
			int b = Integer.parseInt(stra[1]);
			if(b < a){
				swap = a ;
				a = b ;
				b = swap;
			}
			System.out.println(a + " " + b);
		}
	}

} 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{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while (true){
			String str = br.readLine();
			if ("0 0".equals(str)) break;
			list.add(str);
		}
		int swap = 0 ;
		for (int i = 0 ;i < list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int a = Integer.parseInt(stra[0]);
			int b = Integer.parseInt(stra[1]);
			if(b < a){
				swap = a ;
				a = b ;
				b = swap;
			}
			System.out.println(a + " " + b);
		}
	}

} Main public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while (true){
			String str = br.readLine();
			if ("0 0".equals(str)) break;
			list.add(str);
		}
		int swap = 0 ;
		for (int i = 0 ;i < list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int a = Integer.parseInt(stra[0]);
			int b = Integer.parseInt(stra[1]);
			if(b < a){
				swap = a ;
				a = b ;
				b = swap;
			}
			System.out.println(a + " " + b);
		}
	} main {
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while (true){
			String str = br.readLine();
			if ("0 0".equals(str)) break;
			list.add(str);
		}
		int swap = 0 ;
		for (int i = 0 ;i < list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int a = Integer.parseInt(stra[0]);
			int b = Integer.parseInt(stra[1]);
			if(b < a){
				swap = a ;
				a = b ;
				b = swap;
			}
			System.out.println(a + " " + b);
		}
	} BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() while (true){
			String str = br.readLine();
			if ("0 0".equals(str)) break;
			list.add(str);
		} true {
			String str = br.readLine();
			if ("0 0".equals(str)) break;
			list.add(str);
		} String str = br.readLine(); str br.readLine() br.readLine br if ("0 0".equals(str)) break; "0 0".equals(str) "0 0".equals "0 0" str break; list.add(str) list.add list str int swap = 0 ; swap 0 for (int i = 0 ;i < list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int a = Integer.parseInt(stra[0]);
			int b = Integer.parseInt(stra[1]);
			if(b < a){
				swap = a ;
				a = b ;
				b = swap;
			}
			System.out.println(a + " " + b);
		} int i = 0 ; int i = 0 ; i 0 i < list.size() i list.size() list.size list i++ i++ i {
			String[] stra = list.get(i).split(" ");
			int a = Integer.parseInt(stra[0]);
			int b = Integer.parseInt(stra[1]);
			if(b < a){
				swap = a ;
				a = b ;
				b = swap;
			}
			System.out.println(a + " " + b);
		} {
			String[] stra = list.get(i).split(" ");
			int a = Integer.parseInt(stra[0]);
			int b = Integer.parseInt(stra[1]);
			if(b < a){
				swap = a ;
				a = b ;
				b = swap;
			}
			System.out.println(a + " " + b);
		} String[] stra = list.get(i).split(" "); stra list.get(i).split(" ") list.get(i).split list.get(i) list.get list i " " int a = Integer.parseInt(stra[0]); a Integer.parseInt(stra[0]) Integer.parseInt Integer stra[0] stra 0 int b = Integer.parseInt(stra[1]); b Integer.parseInt(stra[1]) Integer.parseInt Integer stra[1] stra 1 if(b < a){
				swap = a ;
				a = b ;
				b = swap;
			} b < a b a {
				swap = a ;
				a = b ;
				b = swap;
			} swap = a swap a a = b a b b = swap b swap System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b String[] args args public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while (true){
			String str = br.readLine();
			if ("0 0".equals(str)) break;
			list.add(str);
		}
		int swap = 0 ;
		for (int i = 0 ;i < list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int a = Integer.parseInt(stra[0]);
			int b = Integer.parseInt(stra[1]);
			if(b < a){
				swap = a ;
				a = b ;
				b = swap;
			}
			System.out.println(a + " " + b);
		}
	}

} public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while (true){
			String str = br.readLine();
			if ("0 0".equals(str)) break;
			list.add(str);
		}
		int swap = 0 ;
		for (int i = 0 ;i < list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int a = Integer.parseInt(stra[0]);
			int b = Integer.parseInt(stra[1]);
			if(b < a){
				swap = a ;
				a = b ;
				b = swap;
			}
			System.out.println(a + " " + b);
		}
	}

} 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{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while (true){
			String str = br.readLine();
			if ("0 0".equals(str)) break;
			list.add(str);
		}
		int swap = 0 ;
		for (int i = 0 ;i < list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int a = Integer.parseInt(stra[0]);
			int b = Integer.parseInt(stra[1]);
			if(b < a){
				swap = a ;
				a = b ;
				b = swap;
			}
			System.out.println(a + " " + b);
		}
	}

}