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


public class Main {
	public static void main(String args[]) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String data[] = reader.readLine().split(" ");
			int a= Integer.parseInt(data[0]);
			int b= Integer.parseInt(data[1]);
			if(a==0 && b==0)
				break;
			
			builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)).append("\n");
		}
		System.out.print(builder);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String args[]) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String data[] = reader.readLine().split(" ");
			int a= Integer.parseInt(data[0]);
			int b= Integer.parseInt(data[1]);
			if(a==0 && b==0)
				break;
			
			builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)).append("\n");
		}
		System.out.print(builder);
	}
} Main public static void main(String args[]) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String data[] = reader.readLine().split(" ");
			int a= Integer.parseInt(data[0]);
			int b= Integer.parseInt(data[1]);
			if(a==0 && b==0)
				break;
			
			builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)).append("\n");
		}
		System.out.print(builder);
	} main {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String data[] = reader.readLine().split(" ");
			int a= Integer.parseInt(data[0]);
			int b= Integer.parseInt(data[1]);
			if(a==0 && b==0)
				break;
			
			builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)).append("\n");
		}
		System.out.print(builder);
	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) StringBuilder builder = new StringBuilder(); builder new StringBuilder() while(true){
			String data[] = reader.readLine().split(" ");
			int a= Integer.parseInt(data[0]);
			int b= Integer.parseInt(data[1]);
			if(a==0 && b==0)
				break;
			
			builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)).append("\n");
		} true {
			String data[] = reader.readLine().split(" ");
			int a= Integer.parseInt(data[0]);
			int b= Integer.parseInt(data[1]);
			if(a==0 && b==0)
				break;
			
			builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)).append("\n");
		} String data[] = reader.readLine().split(" "); data reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " int a= Integer.parseInt(data[0]); a Integer.parseInt(data[0]) Integer.parseInt Integer data[0] data 0 int b= Integer.parseInt(data[1]); b Integer.parseInt(data[1]) Integer.parseInt Integer data[1] data 1 if(a==0 && b==0)
				break; a==0 && b==0 a==0 a 0 b==0 b 0 break; builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)).append("\n") builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)).append builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)) builder.append(Integer.toString(a<b?a:b)).append(" ").append builder.append(Integer.toString(a<b?a:b)).append(" ") builder.append(Integer.toString(a<b?a:b)).append builder.append(Integer.toString(a<b?a:b)) builder.append builder Integer.toString(a<b?a:b) Integer.toString Integer a<b?a:b a<b a b a b " " Integer.toString(a<b?b:a) Integer.toString Integer a<b?b:a a<b a b b a "\n" System.out.print(builder) System.out.print System.out System System.out builder String args[] args public class Main {
	public static void main(String args[]) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String data[] = reader.readLine().split(" ");
			int a= Integer.parseInt(data[0]);
			int b= Integer.parseInt(data[1]);
			if(a==0 && b==0)
				break;
			
			builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)).append("\n");
		}
		System.out.print(builder);
	}
} public class Main {
	public static void main(String args[]) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String data[] = reader.readLine().split(" ");
			int a= Integer.parseInt(data[0]);
			int b= Integer.parseInt(data[1]);
			if(a==0 && b==0)
				break;
			
			builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)).append("\n");
		}
		System.out.print(builder);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class Main {
	public static void main(String args[]) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String data[] = reader.readLine().split(" ");
			int a= Integer.parseInt(data[0]);
			int b= Integer.parseInt(data[1]);
			if(a==0 && b==0)
				break;
			
			builder.append(Integer.toString(a<b?a:b)).append(" ").append(Integer.toString(a<b?b:a)).append("\n");
		}
		System.out.print(builder);
	}
}