import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		StringBuilder output = new StringBuilder();
		Scanner scan = new Scanner(System.in);
		while(true) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			if (a == 0 && b == 0)
				break;
			if (a <= b) {
				output.append(a).append(" ").append(b).append('\n');
			} else {
				output.append(b).append(" ").append(a).append('\n');
			}
		}
		System.out.print(output);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		StringBuilder output = new StringBuilder();
		Scanner scan = new Scanner(System.in);
		while(true) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			if (a == 0 && b == 0)
				break;
			if (a <= b) {
				output.append(a).append(" ").append(b).append('\n');
			} else {
				output.append(b).append(" ").append(a).append('\n');
			}
		}
		System.out.print(output);
	}
} Main public static void main(String[] args) {
		StringBuilder output = new StringBuilder();
		Scanner scan = new Scanner(System.in);
		while(true) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			if (a == 0 && b == 0)
				break;
			if (a <= b) {
				output.append(a).append(" ").append(b).append('\n');
			} else {
				output.append(b).append(" ").append(a).append('\n');
			}
		}
		System.out.print(output);
	} main {
		StringBuilder output = new StringBuilder();
		Scanner scan = new Scanner(System.in);
		while(true) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			if (a == 0 && b == 0)
				break;
			if (a <= b) {
				output.append(a).append(" ").append(b).append('\n');
			} else {
				output.append(b).append(" ").append(a).append('\n');
			}
		}
		System.out.print(output);
	} StringBuilder output = new StringBuilder(); output new StringBuilder() Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(true) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			if (a == 0 && b == 0)
				break;
			if (a <= b) {
				output.append(a).append(" ").append(b).append('\n');
			} else {
				output.append(b).append(" ").append(a).append('\n');
			}
		} true {
			int a = scan.nextInt();
			int b = scan.nextInt();
			if (a == 0 && b == 0)
				break;
			if (a <= b) {
				output.append(a).append(" ").append(b).append('\n');
			} else {
				output.append(b).append(" ").append(a).append('\n');
			}
		} int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan if (a == 0 && b == 0)
				break; a == 0 && b == 0 a == 0 a 0 b == 0 b 0 break; if (a <= b) {
				output.append(a).append(" ").append(b).append('\n');
			} else {
				output.append(b).append(" ").append(a).append('\n');
			} a <= b a b {
				output.append(a).append(" ").append(b).append('\n');
			} output.append(a).append(" ").append(b).append('\n') output.append(a).append(" ").append(b).append output.append(a).append(" ").append(b) output.append(a).append(" ").append output.append(a).append(" ") output.append(a).append output.append(a) output.append output a " " b '\n' {
				output.append(b).append(" ").append(a).append('\n');
			} output.append(b).append(" ").append(a).append('\n') output.append(b).append(" ").append(a).append output.append(b).append(" ").append(a) output.append(b).append(" ").append output.append(b).append(" ") output.append(b).append output.append(b) output.append output b " " a '\n' System.out.print(output) System.out.print System.out System System.out output String[] args args public class Main {
	public static void main(String[] args) {
		StringBuilder output = new StringBuilder();
		Scanner scan = new Scanner(System.in);
		while(true) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			if (a == 0 && b == 0)
				break;
			if (a <= b) {
				output.append(a).append(" ").append(b).append('\n');
			} else {
				output.append(b).append(" ").append(a).append('\n');
			}
		}
		System.out.print(output);
	}
} public class Main {
	public static void main(String[] args) {
		StringBuilder output = new StringBuilder();
		Scanner scan = new Scanner(System.in);
		while(true) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			if (a == 0 && b == 0)
				break;
			if (a <= b) {
				output.append(a).append(" ").append(b).append('\n');
			} else {
				output.append(b).append(" ").append(a).append('\n');
			}
		}
		System.out.print(output);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		StringBuilder output = new StringBuilder();
		Scanner scan = new Scanner(System.in);
		while(true) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			if (a == 0 && b == 0)
				break;
			if (a <= b) {
				output.append(a).append(" ").append(b).append('\n');
			} else {
				output.append(b).append(" ").append(a).append('\n');
			}
		}
		System.out.print(output);
	}
}