import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		String str = new String();
		while(in.hasNext()){
			String line = in.nextLine();
			String[] Array = line.split(" ");
			int a = Integer.parseInt(Array[0]);
			int b = Integer.parseInt(Array[1]);
			if((a+b)==0){
				break;
			}
			if(a>b){
				System.out.println(b+" "+a);
			}else if(a<b){
				System.out.println(a+" "+b);
			}else{
				System.out.println(a+" "+b);
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		String str = new String();
		while(in.hasNext()){
			String line = in.nextLine();
			String[] Array = line.split(" ");
			int a = Integer.parseInt(Array[0]);
			int b = Integer.parseInt(Array[1]);
			if((a+b)==0){
				break;
			}
			if(a>b){
				System.out.println(b+" "+a);
			}else if(a<b){
				System.out.println(a+" "+b);
			}else{
				System.out.println(a+" "+b);
			}
		}
	}
} Main public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		String str = new String();
		while(in.hasNext()){
			String line = in.nextLine();
			String[] Array = line.split(" ");
			int a = Integer.parseInt(Array[0]);
			int b = Integer.parseInt(Array[1]);
			if((a+b)==0){
				break;
			}
			if(a>b){
				System.out.println(b+" "+a);
			}else if(a<b){
				System.out.println(a+" "+b);
			}else{
				System.out.println(a+" "+b);
			}
		}
	} main {
		Scanner in = new Scanner(System.in);
		String str = new String();
		while(in.hasNext()){
			String line = in.nextLine();
			String[] Array = line.split(" ");
			int a = Integer.parseInt(Array[0]);
			int b = Integer.parseInt(Array[1]);
			if((a+b)==0){
				break;
			}
			if(a>b){
				System.out.println(b+" "+a);
			}else if(a<b){
				System.out.println(a+" "+b);
			}else{
				System.out.println(a+" "+b);
			}
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) String str = new String(); str new String() while(in.hasNext()){
			String line = in.nextLine();
			String[] Array = line.split(" ");
			int a = Integer.parseInt(Array[0]);
			int b = Integer.parseInt(Array[1]);
			if((a+b)==0){
				break;
			}
			if(a>b){
				System.out.println(b+" "+a);
			}else if(a<b){
				System.out.println(a+" "+b);
			}else{
				System.out.println(a+" "+b);
			}
		} in.hasNext() in.hasNext in {
			String line = in.nextLine();
			String[] Array = line.split(" ");
			int a = Integer.parseInt(Array[0]);
			int b = Integer.parseInt(Array[1]);
			if((a+b)==0){
				break;
			}
			if(a>b){
				System.out.println(b+" "+a);
			}else if(a<b){
				System.out.println(a+" "+b);
			}else{
				System.out.println(a+" "+b);
			}
		} String line = in.nextLine(); line in.nextLine() in.nextLine in String[] Array = line.split(" "); Array line.split(" ") line.split line " " int a = Integer.parseInt(Array[0]); a Integer.parseInt(Array[0]) Integer.parseInt Integer Array[0] Array 0 int b = Integer.parseInt(Array[1]); b Integer.parseInt(Array[1]) Integer.parseInt Integer Array[1] Array 1 if((a+b)==0){
				break;
			} (a+b)==0 (a+b) a b 0 {
				break;
			} break; if(a>b){
				System.out.println(b+" "+a);
			}else if(a<b){
				System.out.println(a+" "+b);
			}else{
				System.out.println(a+" "+b);
			} a>b a b {
				System.out.println(b+" "+a);
			} System.out.println(b+" "+a) System.out.println System.out System System.out b+" "+a b+" "+a b " " a if(a<b){
				System.out.println(a+" "+b);
			}else{
				System.out.println(a+" "+b);
			} a<b a b {
				System.out.println(a+" "+b);
			} System.out.println(a+" "+b) System.out.println System.out System System.out a+" "+b a+" "+b a " " b {
				System.out.println(a+" "+b);
			} System.out.println(a+" "+b) System.out.println System.out System System.out a+" "+b a+" "+b a " " b String[] args args public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		String str = new String();
		while(in.hasNext()){
			String line = in.nextLine();
			String[] Array = line.split(" ");
			int a = Integer.parseInt(Array[0]);
			int b = Integer.parseInt(Array[1]);
			if((a+b)==0){
				break;
			}
			if(a>b){
				System.out.println(b+" "+a);
			}else if(a<b){
				System.out.println(a+" "+b);
			}else{
				System.out.println(a+" "+b);
			}
		}
	}
} public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		String str = new String();
		while(in.hasNext()){
			String line = in.nextLine();
			String[] Array = line.split(" ");
			int a = Integer.parseInt(Array[0]);
			int b = Integer.parseInt(Array[1]);
			if((a+b)==0){
				break;
			}
			if(a>b){
				System.out.println(b+" "+a);
			}else if(a<b){
				System.out.println(a+" "+b);
			}else{
				System.out.println(a+" "+b);
			}
		}
	}
} Main
import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		String str = new String();
		while(in.hasNext()){
			String line = in.nextLine();
			String[] Array = line.split(" ");
			int a = Integer.parseInt(Array[0]);
			int b = Integer.parseInt(Array[1]);
			if((a+b)==0){
				break;
			}
			if(a>b){
				System.out.println(b+" "+a);
			}else if(a<b){
				System.out.println(a+" "+b);
			}else{
				System.out.println(a+" "+b);
			}
		}
	}
}