import java.io.*;
import java.util.Scanner;

class Main
{
	public static void main (String[] args) throws IOException
	{
  		Scanner in = new Scanner(System.in);

		for(int i = 1; i > 0; i++){

	      	String X,Y;
	  		int x,y;
	
			X = in.next();
	  		Y = in.next();
			x = Integer.parseInt(X);
	  		y = Integer.parseInt(Y);
	
	      	if(x == 0 && y == 0){
	        	break;
	      	}else{
		  		if(x >= y){
		  			System.out.println(y + " " + x);
		  		}else{
		  			System.out.println(x + " " + y);
		  		}
      		}
    	}
	}
} import java.io.*; io.* java import java.util.Scanner; Scanner java.util class Main
{
	public static void main (String[] args) throws IOException
	{
  		Scanner in = new Scanner(System.in);

		for(int i = 1; i > 0; i++){

	      	String X,Y;
	  		int x,y;
	
			X = in.next();
	  		Y = in.next();
			x = Integer.parseInt(X);
	  		y = Integer.parseInt(Y);
	
	      	if(x == 0 && y == 0){
	        	break;
	      	}else{
		  		if(x >= y){
		  			System.out.println(y + " " + x);
		  		}else{
		  			System.out.println(x + " " + y);
		  		}
      		}
    	}
	}
} Main public static void main (String[] args) throws IOException
	{
  		Scanner in = new Scanner(System.in);

		for(int i = 1; i > 0; i++){

	      	String X,Y;
	  		int x,y;
	
			X = in.next();
	  		Y = in.next();
			x = Integer.parseInt(X);
	  		y = Integer.parseInt(Y);
	
	      	if(x == 0 && y == 0){
	        	break;
	      	}else{
		  		if(x >= y){
		  			System.out.println(y + " " + x);
		  		}else{
		  			System.out.println(x + " " + y);
		  		}
      		}
    	}
	} main {
  		Scanner in = new Scanner(System.in);

		for(int i = 1; i > 0; i++){

	      	String X,Y;
	  		int x,y;
	
			X = in.next();
	  		Y = in.next();
			x = Integer.parseInt(X);
	  		y = Integer.parseInt(Y);
	
	      	if(x == 0 && y == 0){
	        	break;
	      	}else{
		  		if(x >= y){
		  			System.out.println(y + " " + x);
		  		}else{
		  			System.out.println(x + " " + y);
		  		}
      		}
    	}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) for(int i = 1; i > 0; i++){

	      	String X,Y;
	  		int x,y;
	
			X = in.next();
	  		Y = in.next();
			x = Integer.parseInt(X);
	  		y = Integer.parseInt(Y);
	
	      	if(x == 0 && y == 0){
	        	break;
	      	}else{
		  		if(x >= y){
		  			System.out.println(y + " " + x);
		  		}else{
		  			System.out.println(x + " " + y);
		  		}
      		}
    	} int i = 1; int i = 1; i 1 i > 0 i 0 i++ i++ i {

	      	String X,Y;
	  		int x,y;
	
			X = in.next();
	  		Y = in.next();
			x = Integer.parseInt(X);
	  		y = Integer.parseInt(Y);
	
	      	if(x == 0 && y == 0){
	        	break;
	      	}else{
		  		if(x >= y){
		  			System.out.println(y + " " + x);
		  		}else{
		  			System.out.println(x + " " + y);
		  		}
      		}
    	} {

	      	String X,Y;
	  		int x,y;
	
			X = in.next();
	  		Y = in.next();
			x = Integer.parseInt(X);
	  		y = Integer.parseInt(Y);
	
	      	if(x == 0 && y == 0){
	        	break;
	      	}else{
		  		if(x >= y){
		  			System.out.println(y + " " + x);
		  		}else{
		  			System.out.println(x + " " + y);
		  		}
      		}
    	} String X X Y; Y int x x y; y X = in.next() X in.next() in.next in Y = in.next() Y in.next() in.next in x = Integer.parseInt(X) x Integer.parseInt(X) Integer.parseInt Integer X y = Integer.parseInt(Y) y Integer.parseInt(Y) Integer.parseInt Integer Y if(x == 0 && y == 0){
	        	break;
	      	}else{
		  		if(x >= y){
		  			System.out.println(y + " " + x);
		  		}else{
		  			System.out.println(x + " " + y);
		  		}
      		} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
	        	break;
	      	} break; {
		  		if(x >= y){
		  			System.out.println(y + " " + x);
		  		}else{
		  			System.out.println(x + " " + y);
		  		}
      		} 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
import java.io.*;
import java.util.Scanner;

class Main
{
	public static void main (String[] args) throws IOException
	{
  		Scanner in = new Scanner(System.in);

		for(int i = 1; i > 0; i++){

	      	String X,Y;
	  		int x,y;
	
			X = in.next();
	  		Y = in.next();
			x = Integer.parseInt(X);
	  		y = Integer.parseInt(Y);
	
	      	if(x == 0 && y == 0){
	        	break;
	      	}else{
		  		if(x >= y){
		  			System.out.println(y + " " + x);
		  		}else{
		  			System.out.println(x + " " + y);
		  		}
      		}
    	}
	}
}