import java.util.Scanner;
	class Main{

		public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
int x;
int y;
int hantei =9;
for(;hantei!=0;){
	x=sc.nextInt();
	y=sc.nextInt();
	
	if(x==0){
		if(y==0){
		System.exit(0);	
		}
	}
	if(x<=y){
		System.out.println(x + " "+y);
	}else if(y<x){
		System.out.println(y + " "+x);
	}
	
	
}
	
	
	
	}
	} import java.util.Scanner; Scanner java.util class Main{

		public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
int x;
int y;
int hantei =9;
for(;hantei!=0;){
	x=sc.nextInt();
	y=sc.nextInt();
	
	if(x==0){
		if(y==0){
		System.exit(0);	
		}
	}
	if(x<=y){
		System.out.println(x + " "+y);
	}else if(y<x){
		System.out.println(y + " "+x);
	}
	
	
}
	
	
	
	}
	} Main public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
int x;
int y;
int hantei =9;
for(;hantei!=0;){
	x=sc.nextInt();
	y=sc.nextInt();
	
	if(x==0){
		if(y==0){
		System.exit(0);	
		}
	}
	if(x<=y){
		System.out.println(x + " "+y);
	}else if(y<x){
		System.out.println(y + " "+x);
	}
	
	
}
	
	
	
	} main {
	Scanner sc=new Scanner(System.in);
int x;
int y;
int hantei =9;
for(;hantei!=0;){
	x=sc.nextInt();
	y=sc.nextInt();
	
	if(x==0){
		if(y==0){
		System.exit(0);	
		}
	}
	if(x<=y){
		System.out.println(x + " "+y);
	}else if(y<x){
		System.out.println(y + " "+x);
	}
	
	
}
	
	
	
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int x; x int y; y int hantei =9; hantei 9 for(;hantei!=0;){
	x=sc.nextInt();
	y=sc.nextInt();
	
	if(x==0){
		if(y==0){
		System.exit(0);	
		}
	}
	if(x<=y){
		System.out.println(x + " "+y);
	}else if(y<x){
		System.out.println(y + " "+x);
	}
	
	
} ; hantei!=0 hantei 0 {
	x=sc.nextInt();
	y=sc.nextInt();
	
	if(x==0){
		if(y==0){
		System.exit(0);	
		}
	}
	if(x<=y){
		System.out.println(x + " "+y);
	}else if(y<x){
		System.out.println(y + " "+x);
	}
	
	
} {
	x=sc.nextInt();
	y=sc.nextInt();
	
	if(x==0){
		if(y==0){
		System.exit(0);	
		}
	}
	if(x<=y){
		System.out.println(x + " "+y);
	}else if(y<x){
		System.out.println(y + " "+x);
	}
	
	
} x=sc.nextInt() x sc.nextInt() sc.nextInt sc y=sc.nextInt() y sc.nextInt() sc.nextInt sc if(x==0){
		if(y==0){
		System.exit(0);	
		}
	} x==0 x 0 {
		if(y==0){
		System.exit(0);	
		}
	} if(y==0){
		System.exit(0);	
		} y==0 y 0 {
		System.exit(0);	
		} System.exit(0) System.exit System 0 if(x<=y){
		System.out.println(x + " "+y);
	}else if(y<x){
		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 if(y<x){
		System.out.println(y + " "+x);
	} y<x y x {
		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
import java.util.Scanner;
	class Main{

		public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
int x;
int y;
int hantei =9;
for(;hantei!=0;){
	x=sc.nextInt();
	y=sc.nextInt();
	
	if(x==0){
		if(y==0){
		System.exit(0);	
		}
	}
	if(x<=y){
		System.out.println(x + " "+y);
	}else if(y<x){
		System.out.println(y + " "+x);
	}
	
	
}
	
	
	
	}
	}