import java.io.*;

class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb=new StringBuilder();
		while(true){
			String s=br.readLine();
			if(s.equals("0 0")) break;
	        int x=Integer.parseInt(s.substring(0, s.indexOf(" ")));
	        int y=Integer.parseInt(s.substring(s.indexOf(" ")+1));
	        if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		}
		System.out.print(sb);
	}
} import java.io.*; io.* java class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb=new StringBuilder();
		while(true){
			String s=br.readLine();
			if(s.equals("0 0")) break;
	        int x=Integer.parseInt(s.substring(0, s.indexOf(" ")));
	        int y=Integer.parseInt(s.substring(s.indexOf(" ")+1));
	        if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		}
		System.out.print(sb);
	}
} Main public static void main(String[] args) throws Exception {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb=new StringBuilder();
		while(true){
			String s=br.readLine();
			if(s.equals("0 0")) break;
	        int x=Integer.parseInt(s.substring(0, s.indexOf(" ")));
	        int y=Integer.parseInt(s.substring(s.indexOf(" ")+1));
	        if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		}
		System.out.print(sb);
	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb=new StringBuilder();
		while(true){
			String s=br.readLine();
			if(s.equals("0 0")) break;
	        int x=Integer.parseInt(s.substring(0, s.indexOf(" ")));
	        int y=Integer.parseInt(s.substring(s.indexOf(" ")+1));
	        if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		}
		System.out.print(sb);
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb=new StringBuilder(); sb new StringBuilder() while(true){
			String s=br.readLine();
			if(s.equals("0 0")) break;
	        int x=Integer.parseInt(s.substring(0, s.indexOf(" ")));
	        int y=Integer.parseInt(s.substring(s.indexOf(" ")+1));
	        if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		} true {
			String s=br.readLine();
			if(s.equals("0 0")) break;
	        int x=Integer.parseInt(s.substring(0, s.indexOf(" ")));
	        int y=Integer.parseInt(s.substring(s.indexOf(" ")+1));
	        if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		} String s=br.readLine(); s br.readLine() br.readLine br if(s.equals("0 0")) break; s.equals("0 0") s.equals s "0 0" break; int x=Integer.parseInt(s.substring(0, s.indexOf(" "))); x Integer.parseInt(s.substring(0, s.indexOf(" "))) Integer.parseInt Integer s.substring(0, s.indexOf(" ")) s.substring s 0 s.indexOf(" ") s.indexOf s " " int y=Integer.parseInt(s.substring(s.indexOf(" ")+1)); y Integer.parseInt(s.substring(s.indexOf(" ")+1)) Integer.parseInt Integer s.substring(s.indexOf(" ")+1) s.substring s s.indexOf(" ")+1 s.indexOf(" ") s.indexOf s " " 1 if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        } x>y x y {
	        	sb.append(y+" "+x+"\n");
	        } sb.append(y+" "+x+"\n") sb.append sb y+" "+x+"\n" x y+" "+x+"\n" y " " x "\n" {
	        	sb.append(x+" "+y+"\n");
	        } sb.append(x+" "+y+"\n") sb.append sb x+" "+y+"\n" y x+" "+y+"\n" x " " y "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args
import java.io.*;

class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb=new StringBuilder();
		while(true){
			String s=br.readLine();
			if(s.equals("0 0")) break;
	        int x=Integer.parseInt(s.substring(0, s.indexOf(" ")));
	        int y=Integer.parseInt(s.substring(s.indexOf(" ")+1));
	        if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		}
		System.out.print(sb);
	}
}