import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner br = new Scanner(System.in);
		int x;
		int y;
		StringBuilder sb = new StringBuilder();
		while (true){
			x = br.nextInt();
			y = br.nextInt();
			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.util.*; util.* java public class Main {
	public static void main(String[] args) throws Exception{
		Scanner br = new Scanner(System.in);
		int x;
		int y;
		StringBuilder sb = new StringBuilder();
		while (true){
			x = br.nextInt();
			y = br.nextInt();
			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 Exception{
		Scanner br = new Scanner(System.in);
		int x;
		int y;
		StringBuilder sb = new StringBuilder();
		while (true){
			x = br.nextInt();
			y = br.nextInt();
			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 {
		Scanner br = new Scanner(System.in);
		int x;
		int y;
		StringBuilder sb = new StringBuilder();
		while (true){
			x = br.nextInt();
			y = br.nextInt();
			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);
	} Scanner br = new Scanner(System.in); br new Scanner(System.in) int x; x int y; y StringBuilder sb = new StringBuilder(); sb new StringBuilder() while (true){
			x = br.nextInt();
			y = br.nextInt();
			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 {
			x = br.nextInt();
			y = br.nextInt();
			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 = br.nextInt() x br.nextInt() br.nextInt br y = br.nextInt() y br.nextInt() br.nextInt br 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 Exception{
		Scanner br = new Scanner(System.in);
		int x;
		int y;
		StringBuilder sb = new StringBuilder();
		while (true){
			x = br.nextInt();
			y = br.nextInt();
			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 Exception{
		Scanner br = new Scanner(System.in);
		int x;
		int y;
		StringBuilder sb = new StringBuilder();
		while (true){
			x = br.nextInt();
			y = br.nextInt();
			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.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner br = new Scanner(System.in);
		int x;
		int y;
		StringBuilder sb = new StringBuilder();
		while (true){
			x = br.nextInt();
			y = br.nextInt();
			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);
	}
}