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

public class Main {

	public static void main(String[] args){

		String str = null;
		BufferedReader br = null;
		br = new BufferedReader(new InputStreamReader(System.in));
		
		boolean b = true;
		String[] str1;
		int n1,n2;
		
		for(;b;){
		
		try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		
		
		str1 = str.split(" ");
		n1 = Integer.parseInt(str1[0]);
		n2 = Integer.parseInt(str1[1]);
		
		if(n1==0 && n2==0){
			b = false;
			break;
			}
		
		if(n1>n2){
		System.out.println(n2+" "+n1);
		}else{
			System.out.println(n1+" "+n2);
		}
		
		
		}
		
	}
} 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){

		String str = null;
		BufferedReader br = null;
		br = new BufferedReader(new InputStreamReader(System.in));
		
		boolean b = true;
		String[] str1;
		int n1,n2;
		
		for(;b;){
		
		try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		
		
		str1 = str.split(" ");
		n1 = Integer.parseInt(str1[0]);
		n2 = Integer.parseInt(str1[1]);
		
		if(n1==0 && n2==0){
			b = false;
			break;
			}
		
		if(n1>n2){
		System.out.println(n2+" "+n1);
		}else{
			System.out.println(n1+" "+n2);
		}
		
		
		}
		
	}
} Main public static void main(String[] args){

		String str = null;
		BufferedReader br = null;
		br = new BufferedReader(new InputStreamReader(System.in));
		
		boolean b = true;
		String[] str1;
		int n1,n2;
		
		for(;b;){
		
		try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		
		
		str1 = str.split(" ");
		n1 = Integer.parseInt(str1[0]);
		n2 = Integer.parseInt(str1[1]);
		
		if(n1==0 && n2==0){
			b = false;
			break;
			}
		
		if(n1>n2){
		System.out.println(n2+" "+n1);
		}else{
			System.out.println(n1+" "+n2);
		}
		
		
		}
		
	} main {

		String str = null;
		BufferedReader br = null;
		br = new BufferedReader(new InputStreamReader(System.in));
		
		boolean b = true;
		String[] str1;
		int n1,n2;
		
		for(;b;){
		
		try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		
		
		str1 = str.split(" ");
		n1 = Integer.parseInt(str1[0]);
		n2 = Integer.parseInt(str1[1]);
		
		if(n1==0 && n2==0){
			b = false;
			break;
			}
		
		if(n1>n2){
		System.out.println(n2+" "+n1);
		}else{
			System.out.println(n1+" "+n2);
		}
		
		
		}
		
	} String str = null; str null BufferedReader br = null; br null br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) boolean b = true; b true String[] str1; str1 int n1 n1 n2; n2 for(;b;){
		
		try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		
		
		str1 = str.split(" ");
		n1 = Integer.parseInt(str1[0]);
		n2 = Integer.parseInt(str1[1]);
		
		if(n1==0 && n2==0){
			b = false;
			break;
			}
		
		if(n1>n2){
		System.out.println(n2+" "+n1);
		}else{
			System.out.println(n1+" "+n2);
		}
		
		
		} ; b {
		
		try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		
		
		str1 = str.split(" ");
		n1 = Integer.parseInt(str1[0]);
		n2 = Integer.parseInt(str1[1]);
		
		if(n1==0 && n2==0){
			b = false;
			break;
			}
		
		if(n1>n2){
		System.out.println(n2+" "+n1);
		}else{
			System.out.println(n1+" "+n2);
		}
		
		
		} {
		
		try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		
		
		str1 = str.split(" ");
		n1 = Integer.parseInt(str1[0]);
		n2 = Integer.parseInt(str1[1]);
		
		if(n1==0 && n2==0){
			b = false;
			break;
			}
		
		if(n1>n2){
		System.out.println(n2+" "+n1);
		}else{
			System.out.println(n1+" "+n2);
		}
		
		
		} try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		} IOException e {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			str = br.readLine();
		} str = br.readLine() str br.readLine() br.readLine br str1 = str.split(" ") str1 str.split(" ") str.split str " " n1 = Integer.parseInt(str1[0]) n1 Integer.parseInt(str1[0]) Integer.parseInt Integer str1[0] str1 0 n2 = Integer.parseInt(str1[1]) n2 Integer.parseInt(str1[1]) Integer.parseInt Integer str1[1] str1 1 if(n1==0 && n2==0){
			b = false;
			break;
			} n1==0 && n2==0 n1==0 n1 0 n2==0 n2 0 {
			b = false;
			break;
			} b = false b false break; if(n1>n2){
		System.out.println(n2+" "+n1);
		}else{
			System.out.println(n1+" "+n2);
		} n1>n2 n1 n2 {
		System.out.println(n2+" "+n1);
		} System.out.println(n2+" "+n1) System.out.println System.out System System.out n2+" "+n1 n2+" "+n1 n2 " " n1 {
			System.out.println(n1+" "+n2);
		} System.out.println(n1+" "+n2) System.out.println System.out System System.out n1+" "+n2 n1+" "+n2 n1 " " n2 String[] args args public class Main {

	public static void main(String[] args){

		String str = null;
		BufferedReader br = null;
		br = new BufferedReader(new InputStreamReader(System.in));
		
		boolean b = true;
		String[] str1;
		int n1,n2;
		
		for(;b;){
		
		try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		
		
		str1 = str.split(" ");
		n1 = Integer.parseInt(str1[0]);
		n2 = Integer.parseInt(str1[1]);
		
		if(n1==0 && n2==0){
			b = false;
			break;
			}
		
		if(n1>n2){
		System.out.println(n2+" "+n1);
		}else{
			System.out.println(n1+" "+n2);
		}
		
		
		}
		
	}
} public class Main {

	public static void main(String[] args){

		String str = null;
		BufferedReader br = null;
		br = new BufferedReader(new InputStreamReader(System.in));
		
		boolean b = true;
		String[] str1;
		int n1,n2;
		
		for(;b;){
		
		try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		
		
		str1 = str.split(" ");
		n1 = Integer.parseInt(str1[0]);
		n2 = Integer.parseInt(str1[1]);
		
		if(n1==0 && n2==0){
			b = false;
			break;
			}
		
		if(n1>n2){
		System.out.println(n2+" "+n1);
		}else{
			System.out.println(n1+" "+n2);
		}
		
		
		}
		
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args){

		String str = null;
		BufferedReader br = null;
		br = new BufferedReader(new InputStreamReader(System.in));
		
		boolean b = true;
		String[] str1;
		int n1,n2;
		
		for(;b;){
		
		try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		
		
		str1 = str.split(" ");
		n1 = Integer.parseInt(str1[0]);
		n2 = Integer.parseInt(str1[1]);
		
		if(n1==0 && n2==0){
			b = false;
			break;
			}
		
		if(n1>n2){
		System.out.println(n2+" "+n1);
		}else{
			System.out.println(n1+" "+n2);
		}
		
		
		}
		
	}
}