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

public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String result = "";
		while(true){
			String[] s = br.readLine().split(" ");			
			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);
			if(a==0 && b==0){break;}
			if(a < b){
				result += a +" "+b+"\n";
			}else{
				result += b +" "+a+"\n";
			}
		}
		System.out.print(result);

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String result = "";
		while(true){
			String[] s = br.readLine().split(" ");			
			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);
			if(a==0 && b==0){break;}
			if(a < b){
				result += a +" "+b+"\n";
			}else{
				result += b +" "+a+"\n";
			}
		}
		System.out.print(result);

	}

} Main /**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String result = "";
		while(true){
			String[] s = br.readLine().split(" ");			
			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);
			if(a==0 && b==0){break;}
			if(a < b){
				result += a +" "+b+"\n";
			}else{
				result += b +" "+a+"\n";
			}
		}
		System.out.print(result);

	} main {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String result = "";
		while(true){
			String[] s = br.readLine().split(" ");			
			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);
			if(a==0 && b==0){break;}
			if(a < b){
				result += a +" "+b+"\n";
			}else{
				result += b +" "+a+"\n";
			}
		}
		System.out.print(result);

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String result = ""; result "" while(true){
			String[] s = br.readLine().split(" ");			
			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);
			if(a==0 && b==0){break;}
			if(a < b){
				result += a +" "+b+"\n";
			}else{
				result += b +" "+a+"\n";
			}
		} true {
			String[] s = br.readLine().split(" ");			
			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);
			if(a==0 && b==0){break;}
			if(a < b){
				result += a +" "+b+"\n";
			}else{
				result += b +" "+a+"\n";
			}
		} String[] s = br.readLine().split(" "); s br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(s[0]); a Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 int b = Integer.parseInt(s[1]); b Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 if(a==0 && b==0){break;} a==0 && b==0 a==0 a 0 b==0 b 0 {break;} break; if(a < b){
				result += a +" "+b+"\n";
			}else{
				result += b +" "+a+"\n";
			} a < b a b {
				result += a +" "+b+"\n";
			} result += a +" "+b+"\n" result a +" "+b+"\n" b a +" "+b+"\n" a " " b "\n" {
				result += b +" "+a+"\n";
			} result += b +" "+a+"\n" result b +" "+a+"\n" a b +" "+a+"\n" b " " a "\n" System.out.print(result) System.out.print System.out System System.out result String[] args args public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String result = "";
		while(true){
			String[] s = br.readLine().split(" ");			
			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);
			if(a==0 && b==0){break;}
			if(a < b){
				result += a +" "+b+"\n";
			}else{
				result += b +" "+a+"\n";
			}
		}
		System.out.print(result);

	}

} public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String result = "";
		while(true){
			String[] s = br.readLine().split(" ");			
			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);
			if(a==0 && b==0){break;}
			if(a < b){
				result += a +" "+b+"\n";
			}else{
				result += b +" "+a+"\n";
			}
		}
		System.out.print(result);

	}

} Main

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

public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String result = "";
		while(true){
			String[] s = br.readLine().split(" ");			
			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);
			if(a==0 && b==0){break;}
			if(a < b){
				result += a +" "+b+"\n";
			}else{
				result += b +" "+a+"\n";
			}
		}
		System.out.print(result);

	}

}