import java.io.*;

public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] str = (br.readLine()).split(" ");
			int x = Integer.parseInt(str[0]); 
			int y = Integer.parseInt(str[1]); 
			if ( x==0 && y==0) {
				break;
			}else if(x < y){
				sb.append(x).append(" ").append(y).append("\n");
			}else{
				sb.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(sb);
	}
} import java.io.*; io.* java public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] str = (br.readLine()).split(" ");
			int x = Integer.parseInt(str[0]); 
			int y = Integer.parseInt(str[1]); 
			if ( x==0 && y==0) {
				break;
			}else if(x < y){
				sb.append(x).append(" ").append(y).append("\n");
			}else{
				sb.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(sb);
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] str = (br.readLine()).split(" ");
			int x = Integer.parseInt(str[0]); 
			int y = Integer.parseInt(str[1]); 
			if ( x==0 && y==0) {
				break;
			}else if(x < y){
				sb.append(x).append(" ").append(y).append("\n");
			}else{
				sb.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(sb);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] str = (br.readLine()).split(" ");
			int x = Integer.parseInt(str[0]); 
			int y = Integer.parseInt(str[1]); 
			if ( x==0 && y==0) {
				break;
			}else if(x < y){
				sb.append(x).append(" ").append(y).append("\n");
			}else{
				sb.append(y).append(" ").append(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[] str = (br.readLine()).split(" ");
			int x = Integer.parseInt(str[0]); 
			int y = Integer.parseInt(str[1]); 
			if ( x==0 && y==0) {
				break;
			}else if(x < y){
				sb.append(x).append(" ").append(y).append("\n");
			}else{
				sb.append(y).append(" ").append(x).append("\n");
			}
		} true {
			String[] str = (br.readLine()).split(" ");
			int x = Integer.parseInt(str[0]); 
			int y = Integer.parseInt(str[1]); 
			if ( x==0 && y==0) {
				break;
			}else if(x < y){
				sb.append(x).append(" ").append(y).append("\n");
			}else{
				sb.append(y).append(" ").append(x).append("\n");
			}
		} String[] str = (br.readLine()).split(" "); str (br.readLine()).split(" ") (br.readLine()).split (br.readLine()) br.readLine br " " int x = Integer.parseInt(str[0]); x Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int y = Integer.parseInt(str[1]); y Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 if ( x==0 && y==0) {
				break;
			}else if(x < y){
				sb.append(x).append(" ").append(y).append("\n");
			}else{
				sb.append(y).append(" ").append(x).append("\n");
			} x==0 && y==0 x==0 x 0 y==0 y 0 {
				break;
			} break; if(x < y){
				sb.append(x).append(" ").append(y).append("\n");
			}else{
				sb.append(y).append(" ").append(x).append("\n");
			} x < y x y {
				sb.append(x).append(" ").append(y).append("\n");
			} sb.append(x).append(" ").append(y).append("\n") sb.append(x).append(" ").append(y).append sb.append(x).append(" ").append(y) sb.append(x).append(" ").append sb.append(x).append(" ") sb.append(x).append sb.append(x) sb.append sb x " " y "\n" {
				sb.append(y).append(" ").append(x).append("\n");
			} sb.append(y).append(" ").append(x).append("\n") sb.append(y).append(" ").append(x).append sb.append(y).append(" ").append(x) sb.append(y).append(" ").append sb.append(y).append(" ") sb.append(y).append sb.append(y) sb.append sb y " " x "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] str = (br.readLine()).split(" ");
			int x = Integer.parseInt(str[0]); 
			int y = Integer.parseInt(str[1]); 
			if ( x==0 && y==0) {
				break;
			}else if(x < y){
				sb.append(x).append(" ").append(y).append("\n");
			}else{
				sb.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(sb);
	}
} public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] str = (br.readLine()).split(" ");
			int x = Integer.parseInt(str[0]); 
			int y = Integer.parseInt(str[1]); 
			if ( x==0 && y==0) {
				break;
			}else if(x < y){
				sb.append(x).append(" ").append(y).append("\n");
			}else{
				sb.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(sb);
	}
} Main
import java.io.*;

public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] str = (br.readLine()).split(" ");
			int x = Integer.parseInt(str[0]); 
			int y = Integer.parseInt(str[1]); 
			if ( x==0 && y==0) {
				break;
			}else if(x < y){
				sb.append(x).append(" ").append(y).append("\n");
			}else{
				sb.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(sb);
	}
}