import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		while(true){
			String str = (a > b) ? b + " " + a : a + " " + b;
			System.out.println(str);
			a = sc.nextInt();
			b = sc.nextInt();
			if(a == 0 && b == 0) break;
		}
		
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		while(true){
			String str = (a > b) ? b + " " + a : a + " " + b;
			System.out.println(str);
			a = sc.nextInt();
			b = sc.nextInt();
			if(a == 0 && b == 0) break;
		}
		
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		while(true){
			String str = (a > b) ? b + " " + a : a + " " + b;
			System.out.println(str);
			a = sc.nextInt();
			b = sc.nextInt();
			if(a == 0 && b == 0) break;
		}
		
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		while(true){
			String str = (a > b) ? b + " " + a : a + " " + b;
			System.out.println(str);
			a = sc.nextInt();
			b = sc.nextInt();
			if(a == 0 && b == 0) break;
		}
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc while(true){
			String str = (a > b) ? b + " " + a : a + " " + b;
			System.out.println(str);
			a = sc.nextInt();
			b = sc.nextInt();
			if(a == 0 && b == 0) break;
		} true {
			String str = (a > b) ? b + " " + a : a + " " + b;
			System.out.println(str);
			a = sc.nextInt();
			b = sc.nextInt();
			if(a == 0 && b == 0) break;
		} String str = (a > b) ? b + " " + a : a + " " + b; str (a > b) ? b + " " + a : a + " " + b (a > b) a b b + " " + a b + " " + a b " " a a + " " + b a + " " + b a " " b System.out.println(str) System.out.println System.out System System.out str a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc if(a == 0 && b == 0) break; a == 0 && b == 0 a == 0 a 0 b == 0 b 0 break; String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		while(true){
			String str = (a > b) ? b + " " + a : a + " " + b;
			System.out.println(str);
			a = sc.nextInt();
			b = sc.nextInt();
			if(a == 0 && b == 0) break;
		}
		
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		while(true){
			String str = (a > b) ? b + " " + a : a + " " + b;
			System.out.println(str);
			a = sc.nextInt();
			b = sc.nextInt();
			if(a == 0 && b == 0) break;
		}
		
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		while(true){
			String str = (a > b) ? b + " " + a : a + " " + b;
			System.out.println(str);
			a = sc.nextInt();
			b = sc.nextInt();
			if(a == 0 && b == 0) break;
		}
		
	}

}