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