import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int i,j;
		
		i=in.nextInt();
		j=in.nextInt();
		while(i!=0 || j!=0){
			if(i<j){
				System.out.println(i+" "+j);
			}else if(i>j){
				System.out.println(j+" "+i);	
			}else{
				System.out.println(i+" "+j);
			}
			i=in.nextInt();
			j=in.nextInt();
		}
		
		in.close();
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int i,j;
		
		i=in.nextInt();
		j=in.nextInt();
		while(i!=0 || j!=0){
			if(i<j){
				System.out.println(i+" "+j);
			}else if(i>j){
				System.out.println(j+" "+i);	
			}else{
				System.out.println(i+" "+j);
			}
			i=in.nextInt();
			j=in.nextInt();
		}
		
		in.close();
	}
} Main public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int i,j;
		
		i=in.nextInt();
		j=in.nextInt();
		while(i!=0 || j!=0){
			if(i<j){
				System.out.println(i+" "+j);
			}else if(i>j){
				System.out.println(j+" "+i);	
			}else{
				System.out.println(i+" "+j);
			}
			i=in.nextInt();
			j=in.nextInt();
		}
		
		in.close();
	} main {
		Scanner in = new Scanner(System.in);
		int i,j;
		
		i=in.nextInt();
		j=in.nextInt();
		while(i!=0 || j!=0){
			if(i<j){
				System.out.println(i+" "+j);
			}else if(i>j){
				System.out.println(j+" "+i);	
			}else{
				System.out.println(i+" "+j);
			}
			i=in.nextInt();
			j=in.nextInt();
		}
		
		in.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int i i j; j i=in.nextInt() i in.nextInt() in.nextInt in j=in.nextInt() j in.nextInt() in.nextInt in while(i!=0 || j!=0){
			if(i<j){
				System.out.println(i+" "+j);
			}else if(i>j){
				System.out.println(j+" "+i);	
			}else{
				System.out.println(i+" "+j);
			}
			i=in.nextInt();
			j=in.nextInt();
		} i!=0 || j!=0 i!=0 i 0 j!=0 j 0 {
			if(i<j){
				System.out.println(i+" "+j);
			}else if(i>j){
				System.out.println(j+" "+i);	
			}else{
				System.out.println(i+" "+j);
			}
			i=in.nextInt();
			j=in.nextInt();
		} if(i<j){
				System.out.println(i+" "+j);
			}else if(i>j){
				System.out.println(j+" "+i);	
			}else{
				System.out.println(i+" "+j);
			} i<j i j {
				System.out.println(i+" "+j);
			} System.out.println(i+" "+j) System.out.println System.out System System.out i+" "+j i+" "+j i " " j if(i>j){
				System.out.println(j+" "+i);	
			}else{
				System.out.println(i+" "+j);
			} i>j i j {
				System.out.println(j+" "+i);	
			} System.out.println(j+" "+i) System.out.println System.out System System.out j+" "+i j+" "+i j " " i {
				System.out.println(i+" "+j);
			} System.out.println(i+" "+j) System.out.println System.out System System.out i+" "+j i+" "+j i " " j i=in.nextInt() i in.nextInt() in.nextInt in j=in.nextInt() j in.nextInt() in.nextInt in in.close() in.close in String[] args args public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int i,j;
		
		i=in.nextInt();
		j=in.nextInt();
		while(i!=0 || j!=0){
			if(i<j){
				System.out.println(i+" "+j);
			}else if(i>j){
				System.out.println(j+" "+i);	
			}else{
				System.out.println(i+" "+j);
			}
			i=in.nextInt();
			j=in.nextInt();
		}
		
		in.close();
	}
} public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int i,j;
		
		i=in.nextInt();
		j=in.nextInt();
		while(i!=0 || j!=0){
			if(i<j){
				System.out.println(i+" "+j);
			}else if(i>j){
				System.out.println(j+" "+i);	
			}else{
				System.out.println(i+" "+j);
			}
			i=in.nextInt();
			j=in.nextInt();
		}
		
		in.close();
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int i,j;
		
		i=in.nextInt();
		j=in.nextInt();
		while(i!=0 || j!=0){
			if(i<j){
				System.out.println(i+" "+j);
			}else if(i>j){
				System.out.println(j+" "+i);	
			}else{
				System.out.println(i+" "+j);
			}
			i=in.nextInt();
			j=in.nextInt();
		}
		
		in.close();
	}
}