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[] a=br.readLine().split(" ");
			if(a[0].equals("0")&&a[1].equals("0")) break;
	        int x=Integer.parseInt(a[0]);
	        int y=Integer.parseInt(a[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[] a=br.readLine().split(" ");
			if(a[0].equals("0")&&a[1].equals("0")) break;
	        int x=Integer.parseInt(a[0]);
	        int y=Integer.parseInt(a[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[] a=br.readLine().split(" ");
			if(a[0].equals("0")&&a[1].equals("0")) break;
	        int x=Integer.parseInt(a[0]);
	        int y=Integer.parseInt(a[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[] a=br.readLine().split(" ");
			if(a[0].equals("0")&&a[1].equals("0")) break;
	        int x=Integer.parseInt(a[0]);
	        int y=Integer.parseInt(a[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[] a=br.readLine().split(" ");
			if(a[0].equals("0")&&a[1].equals("0")) break;
	        int x=Integer.parseInt(a[0]);
	        int y=Integer.parseInt(a[1]);
	        if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		} true {
			String[] a=br.readLine().split(" ");
			if(a[0].equals("0")&&a[1].equals("0")) break;
	        int x=Integer.parseInt(a[0]);
	        int y=Integer.parseInt(a[1]);
	        if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		} String[] a=br.readLine().split(" "); a br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " if(a[0].equals("0")&&a[1].equals("0")) break; a[0].equals("0")&&a[1].equals("0") a[0].equals("0") a[0].equals a[0] a 0 "0" a[1].equals("0") a[1].equals a[1] a 1 "0" break; int x=Integer.parseInt(a[0]); x Integer.parseInt(a[0]) Integer.parseInt Integer a[0] a 0 int y=Integer.parseInt(a[1]); y Integer.parseInt(a[1]) Integer.parseInt Integer a[1] a 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[] a=br.readLine().split(" ");
			if(a[0].equals("0")&&a[1].equals("0")) break;
	        int x=Integer.parseInt(a[0]);
	        int y=Integer.parseInt(a[1]);
	        if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		}
		System.out.print(sb);
	}
}