import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		
		
		while(true){
			 
			 int x = Integer.parseInt(s.next());
			 int y = Integer.parseInt(s.next());
			 
			 if(x==0 && y==0){
				 break;
			 }
			 if(x<y){
				 System.out.println(x+" "+y);
			 }else{
				 System.out.println(y+" "+x);
			 }	 

		}
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		
		
		while(true){
			 
			 int x = Integer.parseInt(s.next());
			 int y = Integer.parseInt(s.next());
			 
			 if(x==0 && y==0){
				 break;
			 }
			 if(x<y){
				 System.out.println(x+" "+y);
			 }else{
				 System.out.println(y+" "+x);
			 }	 

		}
	}

} Main public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		
		
		while(true){
			 
			 int x = Integer.parseInt(s.next());
			 int y = Integer.parseInt(s.next());
			 
			 if(x==0 && y==0){
				 break;
			 }
			 if(x<y){
				 System.out.println(x+" "+y);
			 }else{
				 System.out.println(y+" "+x);
			 }	 

		}
	} main {
		
		Scanner s = new Scanner(System.in);
		
		
		while(true){
			 
			 int x = Integer.parseInt(s.next());
			 int y = Integer.parseInt(s.next());
			 
			 if(x==0 && y==0){
				 break;
			 }
			 if(x<y){
				 System.out.println(x+" "+y);
			 }else{
				 System.out.println(y+" "+x);
			 }	 

		}
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) while(true){
			 
			 int x = Integer.parseInt(s.next());
			 int y = Integer.parseInt(s.next());
			 
			 if(x==0 && y==0){
				 break;
			 }
			 if(x<y){
				 System.out.println(x+" "+y);
			 }else{
				 System.out.println(y+" "+x);
			 }	 

		} true {
			 
			 int x = Integer.parseInt(s.next());
			 int y = Integer.parseInt(s.next());
			 
			 if(x==0 && y==0){
				 break;
			 }
			 if(x<y){
				 System.out.println(x+" "+y);
			 }else{
				 System.out.println(y+" "+x);
			 }	 

		} int x = Integer.parseInt(s.next()); x Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s int y = Integer.parseInt(s.next()); y Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s if(x==0 && y==0){
				 break;
			 } x==0 && y==0 x==0 x 0 y==0 y 0 {
				 break;
			 } break; if(x<y){
				 System.out.println(x+" "+y);
			 }else{
				 System.out.println(y+" "+x);
			 } x<y x y {
				 System.out.println(x+" "+y);
			 } System.out.println(x+" "+y) System.out.println System.out System System.out 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 String[] args args public class Main {

	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		
		
		while(true){
			 
			 int x = Integer.parseInt(s.next());
			 int y = Integer.parseInt(s.next());
			 
			 if(x==0 && y==0){
				 break;
			 }
			 if(x<y){
				 System.out.println(x+" "+y);
			 }else{
				 System.out.println(y+" "+x);
			 }	 

		}
	}

} public class Main {

	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		
		
		while(true){
			 
			 int x = Integer.parseInt(s.next());
			 int y = Integer.parseInt(s.next());
			 
			 if(x==0 && y==0){
				 break;
			 }
			 if(x<y){
				 System.out.println(x+" "+y);
			 }else{
				 System.out.println(y+" "+x);
			 }	 

		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		
		
		while(true){
			 
			 int x = Integer.parseInt(s.next());
			 int y = Integer.parseInt(s.next());
			 
			 if(x==0 && y==0){
				 break;
			 }
			 if(x<y){
				 System.out.println(x+" "+y);
			 }else{
				 System.out.println(y+" "+x);
			 }	 

		}
	}

}