
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		String[] arrStr;
		StringBuilder output = new StringBuilder();
		int a,b;
		try {

			while(true){
				str = br.readLine();

				if(str.equals("0 0")){
					// ??????
					break;
				}

				arrStr = str.split(" ");
				a = Integer.parseInt(arrStr[0]);
				b = Integer.parseInt(arrStr[1]);

				if(a<b){
					output.append(a).append(" ").append(b).append("\n");
				}else{
					output.append(b).append(" ").append(a).append("\n");
				}
			}
			System.out.print(output.toString());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		String[] arrStr;
		StringBuilder output = new StringBuilder();
		int a,b;
		try {

			while(true){
				str = br.readLine();

				if(str.equals("0 0")){
					// ??????
					break;
				}

				arrStr = str.split(" ");
				a = Integer.parseInt(arrStr[0]);
				b = Integer.parseInt(arrStr[1]);

				if(a<b){
					output.append(a).append(" ").append(b).append("\n");
				}else{
					output.append(b).append(" ").append(a).append("\n");
				}
			}
			System.out.print(output.toString());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} Main public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		String[] arrStr;
		StringBuilder output = new StringBuilder();
		int a,b;
		try {

			while(true){
				str = br.readLine();

				if(str.equals("0 0")){
					// ??????
					break;
				}

				arrStr = str.split(" ");
				a = Integer.parseInt(arrStr[0]);
				b = Integer.parseInt(arrStr[1]);

				if(a<b){
					output.append(a).append(" ").append(b).append("\n");
				}else{
					output.append(b).append(" ").append(a).append("\n");
				}
			}
			System.out.print(output.toString());
		} catch (IOException e) {
			e.printStackTrace();
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		String[] arrStr;
		StringBuilder output = new StringBuilder();
		int a,b;
		try {

			while(true){
				str = br.readLine();

				if(str.equals("0 0")){
					// ??????
					break;
				}

				arrStr = str.split(" ");
				a = Integer.parseInt(arrStr[0]);
				b = Integer.parseInt(arrStr[1]);

				if(a<b){
					output.append(a).append(" ").append(b).append("\n");
				}else{
					output.append(b).append(" ").append(a).append("\n");
				}
			}
			System.out.print(output.toString());
		} catch (IOException e) {
			e.printStackTrace();
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str String[] arrStr; arrStr StringBuilder output = new StringBuilder(); output new StringBuilder() int a a b; b try {

			while(true){
				str = br.readLine();

				if(str.equals("0 0")){
					// ??????
					break;
				}

				arrStr = str.split(" ");
				a = Integer.parseInt(arrStr[0]);
				b = Integer.parseInt(arrStr[1]);

				if(a<b){
					output.append(a).append(" ").append(b).append("\n");
				}else{
					output.append(b).append(" ").append(a).append("\n");
				}
			}
			System.out.print(output.toString());
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {

			while(true){
				str = br.readLine();

				if(str.equals("0 0")){
					// ??????
					break;
				}

				arrStr = str.split(" ");
				a = Integer.parseInt(arrStr[0]);
				b = Integer.parseInt(arrStr[1]);

				if(a<b){
					output.append(a).append(" ").append(b).append("\n");
				}else{
					output.append(b).append(" ").append(a).append("\n");
				}
			}
			System.out.print(output.toString());
		} while(true){
				str = br.readLine();

				if(str.equals("0 0")){
					// ??????
					break;
				}

				arrStr = str.split(" ");
				a = Integer.parseInt(arrStr[0]);
				b = Integer.parseInt(arrStr[1]);

				if(a<b){
					output.append(a).append(" ").append(b).append("\n");
				}else{
					output.append(b).append(" ").append(a).append("\n");
				}
			} true {
				str = br.readLine();

				if(str.equals("0 0")){
					// ??????
					break;
				}

				arrStr = str.split(" ");
				a = Integer.parseInt(arrStr[0]);
				b = Integer.parseInt(arrStr[1]);

				if(a<b){
					output.append(a).append(" ").append(b).append("\n");
				}else{
					output.append(b).append(" ").append(a).append("\n");
				}
			} str = br.readLine() str br.readLine() br.readLine br if(str.equals("0 0")){
					// ??????
					break;
				} str.equals("0 0") str.equals str "0 0" {
					// ??????
					break;
				} break; arrStr = str.split(" ") arrStr str.split(" ") str.split str " " a = Integer.parseInt(arrStr[0]) a Integer.parseInt(arrStr[0]) Integer.parseInt Integer arrStr[0] arrStr 0 b = Integer.parseInt(arrStr[1]) b Integer.parseInt(arrStr[1]) Integer.parseInt Integer arrStr[1] arrStr 1 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.toString()) System.out.print System.out System System.out output.toString() output.toString output String[] args args public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		String[] arrStr;
		StringBuilder output = new StringBuilder();
		int a,b;
		try {

			while(true){
				str = br.readLine();

				if(str.equals("0 0")){
					// ??????
					break;
				}

				arrStr = str.split(" ");
				a = Integer.parseInt(arrStr[0]);
				b = Integer.parseInt(arrStr[1]);

				if(a<b){
					output.append(a).append(" ").append(b).append("\n");
				}else{
					output.append(b).append(" ").append(a).append("\n");
				}
			}
			System.out.print(output.toString());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		String[] arrStr;
		StringBuilder output = new StringBuilder();
		int a,b;
		try {

			while(true){
				str = br.readLine();

				if(str.equals("0 0")){
					// ??????
					break;
				}

				arrStr = str.split(" ");
				a = Integer.parseInt(arrStr[0]);
				b = Integer.parseInt(arrStr[1]);

				if(a<b){
					output.append(a).append(" ").append(b).append("\n");
				}else{
					output.append(b).append(" ").append(a).append("\n");
				}
			}
			System.out.print(output.toString());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} Main

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		String[] arrStr;
		StringBuilder output = new StringBuilder();
		int a,b;
		try {

			while(true){
				str = br.readLine();

				if(str.equals("0 0")){
					// ??????
					break;
				}

				arrStr = str.split(" ");
				a = Integer.parseInt(arrStr[0]);
				b = Integer.parseInt(arrStr[1]);

				if(a<b){
					output.append(a).append(" ").append(b).append("\n");
				}else{
					output.append(b).append(" ").append(a).append("\n");
				}
			}
			System.out.print(output.toString());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}