import java.util.Scanner;

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


		while(true){
			int x = scan.nextInt();
			int y = scan.nextInt();

			if(x==0 & y==0){break;}

			String result = x < y ? x + " " + y : y + " " + x;

			System.out.println(result);

		}

		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);


		while(true){
			int x = scan.nextInt();
			int y = scan.nextInt();

			if(x==0 & y==0){break;}

			String result = x < y ? x + " " + y : y + " " + x;

			System.out.println(result);

		}

		scan.close();
	}
} Main public static void main(String args[]){
		Scanner scan = new Scanner(System.in);


		while(true){
			int x = scan.nextInt();
			int y = scan.nextInt();

			if(x==0 & y==0){break;}

			String result = x < y ? x + " " + y : y + " " + x;

			System.out.println(result);

		}

		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);


		while(true){
			int x = scan.nextInt();
			int y = scan.nextInt();

			if(x==0 & y==0){break;}

			String result = x < y ? x + " " + y : y + " " + x;

			System.out.println(result);

		}

		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(true){
			int x = scan.nextInt();
			int y = scan.nextInt();

			if(x==0 & y==0){break;}

			String result = x < y ? x + " " + y : y + " " + x;

			System.out.println(result);

		} true {
			int x = scan.nextInt();
			int y = scan.nextInt();

			if(x==0 & y==0){break;}

			String result = x < y ? x + " " + y : y + " " + x;

			System.out.println(result);

		} int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan if(x==0 & y==0){break;} x==0 & y==0 x==0 x 0 y==0 y 0 {break;} break; String result = x < y ? x + " " + y : y + " " + x; result x < y ? x + " " + y : y + " " + x x < y x y x + " " + y x + " " + y x " " y y + " " + x y + " " + x y " " x System.out.println(result) System.out.println System.out System System.out result scan.close() scan.close scan String args[] args public class Main {
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);


		while(true){
			int x = scan.nextInt();
			int y = scan.nextInt();

			if(x==0 & y==0){break;}

			String result = x < y ? x + " " + y : y + " " + x;

			System.out.println(result);

		}

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


		while(true){
			int x = scan.nextInt();
			int y = scan.nextInt();

			if(x==0 & y==0){break;}

			String result = x < y ? x + " " + y : y + " " + x;

			System.out.println(result);

		}

		scan.close();
	}
} Main
import java.util.Scanner;

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


		while(true){
			int x = scan.nextInt();
			int y = scan.nextInt();

			if(x==0 & y==0){break;}

			String result = x < y ? x + " " + y : y + " " + x;

			System.out.println(result);

		}

		scan.close();
	}
}