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 line[] = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);				
			int y = Integer.parseInt(line[1]);
			if(x == 0 && y == 0){
				break;
			}
			else{
				sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)).append("\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 line[] = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);				
			int y = Integer.parseInt(line[1]);
			if(x == 0 && y == 0){
				break;
			}
			else{
				sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)).append("\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 line[] = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);				
			int y = Integer.parseInt(line[1]);
			if(x == 0 && y == 0){
				break;
			}
			else{
				sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)).append("\n");
			}
		}
		System.out.print(sb);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		
		while(true){
			String line[] = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);				
			int y = Integer.parseInt(line[1]);
			if(x == 0 && y == 0){
				break;
			}
			else{
				sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)).append("\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 line[] = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);				
			int y = Integer.parseInt(line[1]);
			if(x == 0 && y == 0){
				break;
			}
			else{
				sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)).append("\n");
			}
		} true {
			String line[] = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);				
			int y = Integer.parseInt(line[1]);
			if(x == 0 && y == 0){
				break;
			}
			else{
				sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)).append("\n");
			}
		} String line[] = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int x = Integer.parseInt(line[0]); x Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int y = Integer.parseInt(line[1]); y Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 if(x == 0 && y == 0){
				break;
			}
			else{
				sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)).append("\n");
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				break;
			} break; {
				sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)).append("\n");
			} sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)).append("\n") sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)).append sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)) sb.append(Integer.toString(x < y ? x : y)).append(" ").append sb.append(Integer.toString(x < y ? x : y)).append(" ") sb.append(Integer.toString(x < y ? x : y)).append sb.append(Integer.toString(x < y ? x : y)) sb.append sb Integer.toString(x < y ? x : y) Integer.toString Integer x < y ? x : y x < y x y x y " " Integer.toString(x < y ? y : x) Integer.toString Integer x < y ? y : x x < y x y y x "\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 line[] = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);				
			int y = Integer.parseInt(line[1]);
			if(x == 0 && y == 0){
				break;
			}
			else{
				sb.append(Integer.toString(x < y ? x : y)).append(" ").append(Integer.toString(x < y ? y : x)).append("\n");
			}
		}
		System.out.print(sb);
	}
}