import java.util.Scanner;

class Main{
    public static void main(String[] a){
    	int x, y ,tmp;
    	Scanner in = new Scanner(System.in);
      while (true){
      	x = in.nextInt();
      	y = in.nextInt();
      	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 class Main{
    public static void main(String[] a){
    	int x, y ,tmp;
    	Scanner in = new Scanner(System.in);
      while (true){
      	x = in.nextInt();
      	y = in.nextInt();
      	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[] a){
    	int x, y ,tmp;
    	Scanner in = new Scanner(System.in);
      while (true){
      	x = in.nextInt();
      	y = in.nextInt();
      	if(x == 0 && y == 0) break;
      	if(x<y)
        	System.out.println(x + " " + y);
        else
        	System.out.println(y + " " + x);
      }
    } main {
    	int x, y ,tmp;
    	Scanner in = new Scanner(System.in);
      while (true){
      	x = in.nextInt();
      	y = in.nextInt();
      	if(x == 0 && y == 0) break;
      	if(x<y)
        	System.out.println(x + " " + y);
        else
        	System.out.println(y + " " + x);
      }
    } int x x y y tmp; tmp Scanner in = new Scanner(System.in); in new Scanner(System.in) while (true){
      	x = in.nextInt();
      	y = in.nextInt();
      	if(x == 0 && y == 0) break;
      	if(x<y)
        	System.out.println(x + " " + y);
        else
        	System.out.println(y + " " + x);
      } true {
      	x = in.nextInt();
      	y = in.nextInt();
      	if(x == 0 && y == 0) break;
      	if(x<y)
        	System.out.println(x + " " + y);
        else
        	System.out.println(y + " " + x);
      } x = in.nextInt() x in.nextInt() in.nextInt in y = in.nextInt() y in.nextInt() in.nextInt in 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(x + " " + y);
        else
        	System.out.println(y + " " + x); x<y 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 System.out System System.out y + " " + x y + " " + x y " " x String[] a a
import java.util.Scanner;

class Main{
    public static void main(String[] a){
    	int x, y ,tmp;
    	Scanner in = new Scanner(System.in);
      while (true){
      	x = in.nextInt();
      	y = in.nextInt();
      	if(x == 0 && y == 0) break;
      	if(x<y)
        	System.out.println(x + " " + y);
        else
        	System.out.println(y + " " + x);
      }
    }
}