import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();

		String string = "";
		int cn = 0;
		while (true) {
			string = sc.nextLine();
			lines.add(string);
			cn++;
			if (string.equals("0 0")) {
				break;
			}
		}
		
		String[] kari1 = new String[2];

		for (int i = 0; i < cn; i++) {
			kari1 = lines.get(i).split(" ");
			int[] kari2 = {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])};
			Arrays.sort(kari2);
			if (kari2[0] == 0 && kari2[1] == 0) {
				break;
			} else {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			}
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();

		String string = "";
		int cn = 0;
		while (true) {
			string = sc.nextLine();
			lines.add(string);
			cn++;
			if (string.equals("0 0")) {
				break;
			}
		}
		
		String[] kari1 = new String[2];

		for (int i = 0; i < cn; i++) {
			kari1 = lines.get(i).split(" ");
			int[] kari2 = {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])};
			Arrays.sort(kari2);
			if (kari2[0] == 0 && kari2[1] == 0) {
				break;
			} else {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();

		String string = "";
		int cn = 0;
		while (true) {
			string = sc.nextLine();
			lines.add(string);
			cn++;
			if (string.equals("0 0")) {
				break;
			}
		}
		
		String[] kari1 = new String[2];

		for (int i = 0; i < cn; i++) {
			kari1 = lines.get(i).split(" ");
			int[] kari2 = {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])};
			Arrays.sort(kari2);
			if (kari2[0] == 0 && kari2[1] == 0) {
				break;
			} else {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();

		String string = "";
		int cn = 0;
		while (true) {
			string = sc.nextLine();
			lines.add(string);
			cn++;
			if (string.equals("0 0")) {
				break;
			}
		}
		
		String[] kari1 = new String[2];

		for (int i = 0; i < cn; i++) {
			kari1 = lines.get(i).split(" ");
			int[] kari2 = {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])};
			Arrays.sort(kari2);
			if (kari2[0] == 0 && kari2[1] == 0) {
				break;
			} else {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<String> lines = new ArrayList<String>(); lines new ArrayList<String>() String string = ""; string "" int cn = 0; cn 0 while (true) {
			string = sc.nextLine();
			lines.add(string);
			cn++;
			if (string.equals("0 0")) {
				break;
			}
		} true {
			string = sc.nextLine();
			lines.add(string);
			cn++;
			if (string.equals("0 0")) {
				break;
			}
		} string = sc.nextLine() string sc.nextLine() sc.nextLine sc lines.add(string) lines.add lines string cn++ cn if (string.equals("0 0")) {
				break;
			} string.equals("0 0") string.equals string "0 0" {
				break;
			} break; String[] kari1 = new String[2]; kari1 new String[2] 2 for (int i = 0; i < cn; i++) {
			kari1 = lines.get(i).split(" ");
			int[] kari2 = {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])};
			Arrays.sort(kari2);
			if (kari2[0] == 0 && kari2[1] == 0) {
				break;
			} else {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			}
		} int i = 0; int i = 0; i 0 i < cn i cn i++ i++ i {
			kari1 = lines.get(i).split(" ");
			int[] kari2 = {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])};
			Arrays.sort(kari2);
			if (kari2[0] == 0 && kari2[1] == 0) {
				break;
			} else {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			}
		} {
			kari1 = lines.get(i).split(" ");
			int[] kari2 = {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])};
			Arrays.sort(kari2);
			if (kari2[0] == 0 && kari2[1] == 0) {
				break;
			} else {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			}
		} kari1 = lines.get(i).split(" ") kari1 lines.get(i).split(" ") lines.get(i).split lines.get(i) lines.get lines i " " int[] kari2 = {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])}; kari2 {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])} Integer.parseInt(kari1[0]) Integer.parseInt Integer kari1[0] kari1 0 Integer.parseInt(kari1[1]) Integer.parseInt Integer kari1[1] kari1 1 Arrays.sort(kari2) Arrays.sort Arrays kari2 if (kari2[0] == 0 && kari2[1] == 0) {
				break;
			} else {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			} kari2[0] == 0 && kari2[1] == 0 kari2[0] == 0 kari2[0] kari2 0 0 kari2[1] == 0 kari2[1] kari2 1 0 {
				break;
			} break; {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			} System.out.print(kari2[0]) System.out.print System.out System System.out kari2[0] kari2 0 System.out.print(" ") System.out.print System.out System System.out " " System.out.println(kari2[1]) System.out.println System.out System System.out kari2[1] kari2 1 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();

		String string = "";
		int cn = 0;
		while (true) {
			string = sc.nextLine();
			lines.add(string);
			cn++;
			if (string.equals("0 0")) {
				break;
			}
		}
		
		String[] kari1 = new String[2];

		for (int i = 0; i < cn; i++) {
			kari1 = lines.get(i).split(" ");
			int[] kari2 = {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])};
			Arrays.sort(kari2);
			if (kari2[0] == 0 && kari2[1] == 0) {
				break;
			} else {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			}
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();

		String string = "";
		int cn = 0;
		while (true) {
			string = sc.nextLine();
			lines.add(string);
			cn++;
			if (string.equals("0 0")) {
				break;
			}
		}
		
		String[] kari1 = new String[2];

		for (int i = 0; i < cn; i++) {
			kari1 = lines.get(i).split(" ");
			int[] kari2 = {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])};
			Arrays.sort(kari2);
			if (kari2[0] == 0 && kari2[1] == 0) {
				break;
			} else {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			}
		}
	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();

		String string = "";
		int cn = 0;
		while (true) {
			string = sc.nextLine();
			lines.add(string);
			cn++;
			if (string.equals("0 0")) {
				break;
			}
		}
		
		String[] kari1 = new String[2];

		for (int i = 0; i < cn; i++) {
			kari1 = lines.get(i).split(" ");
			int[] kari2 = {Integer.parseInt(kari1[0]),Integer.parseInt(kari1[1])};
			Arrays.sort(kari2);
			if (kari2[0] == 0 && kari2[1] == 0) {
				break;
			} else {
				System.out.print(kari2[0]);
				System.out.print(" ");
				System.out.println(kari2[1]);
			}
		}
	}
}