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

public class Main{


	public static void main(String[] args){

		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));

		try{
		for(;;){

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		}
		}catch(IOException e){
			System.out.println("??¨??????:"+e);

		}

	}

} 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 reader=new BufferedReader(new InputStreamReader(System.in));

		try{
		for(;;){

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		}
		}catch(IOException e){
			System.out.println("??¨??????:"+e);

		}

	}

} Main public static void main(String[] args){

		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));

		try{
		for(;;){

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		}
		}catch(IOException e){
			System.out.println("??¨??????:"+e);

		}

	} main {

		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));

		try{
		for(;;){

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		}
		}catch(IOException e){
			System.out.println("??¨??????:"+e);

		}

	} BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) try{
		for(;;){

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		}
		}catch(IOException e){
			System.out.println("??¨??????:"+e);

		} catch(IOException e){
			System.out.println("??¨??????:"+e);

		} IOException e {
			System.out.println("??¨??????:"+e);

		} System.out.println("??¨??????:"+e) System.out.println System.out System System.out "??¨??????:"+e "??¨??????:" e {
		for(;;){

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		}
		} for(;;){

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		} ; {

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		} {

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		} String str=reader.readLine(); str reader.readLine() reader.readLine reader String[] str_Array=str.split(" "); str_Array str.split(" ") str.split str " " int x=Integer.parseInt(str_Array[0]); x Integer.parseInt(str_Array[0]) Integer.parseInt Integer str_Array[0] str_Array 0 int y=Integer.parseInt(str_Array[1]); y Integer.parseInt(str_Array[1]) Integer.parseInt Integer str_Array[1] str_Array 1 if(x==0&&y==0)break; x==0&&y==0 x==0 x 0 y==0 y 0 break; if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);} x>y x y {System.out.println(y+" "+x);} System.out.println(y+" "+x) System.out.println System.out System System.out y+" "+x y+" "+x y " " x {System.out.println(x+" "+y);} System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y String[] args args public class Main{


	public static void main(String[] args){

		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));

		try{
		for(;;){

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		}
		}catch(IOException e){
			System.out.println("??¨??????:"+e);

		}

	}

} public class Main{


	public static void main(String[] args){

		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));

		try{
		for(;;){

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		}
		}catch(IOException e){
			System.out.println("??¨??????:"+e);

		}

	}

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

public class Main{


	public static void main(String[] args){

		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));

		try{
		for(;;){

			String str=reader.readLine();
			String[] str_Array=str.split(" ");

			int x=Integer.parseInt(str_Array[0]);
			int y=Integer.parseInt(str_Array[1]);

			if(x==0&&y==0)break;

			if(x>y){System.out.println(y+" "+x);}
			else{System.out.println(x+" "+y);}

		}
		}catch(IOException e){
			System.out.println("??¨??????:"+e);

		}

	}

}