import java.util.*;

class Main{
	public static void main (String[] args ){
		int x,y;
		int z = 0;
		Scanner in = new Scanner(System.in);
		while(true){
			x = in.nextInt();
			y = in.nextInt();
			if( x == 0 && y == 0){
				break;
			}else if (x <= y ){
				System.out.println(String.valueOf(x) + ' ' + String.valueOf(y));
			} else {
				System.out.println(String.valueOf(y) + ' ' + String.valueOf(x));
			}
		}
	}
} import java.util.*; util.* java class Main{
	public static void main (String[] args ){
		int x,y;
		int z = 0;
		Scanner in = new Scanner(System.in);
		while(true){
			x = in.nextInt();
			y = in.nextInt();
			if( x == 0 && y == 0){
				break;
			}else if (x <= y ){
				System.out.println(String.valueOf(x) + ' ' + String.valueOf(y));
			} else {
				System.out.println(String.valueOf(y) + ' ' + String.valueOf(x));
			}
		}
	}
} Main public static void main (String[] args ){
		int x,y;
		int z = 0;
		Scanner in = new Scanner(System.in);
		while(true){
			x = in.nextInt();
			y = in.nextInt();
			if( x == 0 && y == 0){
				break;
			}else if (x <= y ){
				System.out.println(String.valueOf(x) + ' ' + String.valueOf(y));
			} else {
				System.out.println(String.valueOf(y) + ' ' + String.valueOf(x));
			}
		}
	} main {
		int x,y;
		int z = 0;
		Scanner in = new Scanner(System.in);
		while(true){
			x = in.nextInt();
			y = in.nextInt();
			if( x == 0 && y == 0){
				break;
			}else if (x <= y ){
				System.out.println(String.valueOf(x) + ' ' + String.valueOf(y));
			} else {
				System.out.println(String.valueOf(y) + ' ' + String.valueOf(x));
			}
		}
	} int x x y; y int z = 0; z 0 Scanner in = new Scanner(System.in); in new Scanner(System.in) while(true){
			x = in.nextInt();
			y = in.nextInt();
			if( x == 0 && y == 0){
				break;
			}else if (x <= y ){
				System.out.println(String.valueOf(x) + ' ' + String.valueOf(y));
			} else {
				System.out.println(String.valueOf(y) + ' ' + String.valueOf(x));
			}
		} true {
			x = in.nextInt();
			y = in.nextInt();
			if( x == 0 && y == 0){
				break;
			}else if (x <= y ){
				System.out.println(String.valueOf(x) + ' ' + String.valueOf(y));
			} else {
				System.out.println(String.valueOf(y) + ' ' + String.valueOf(x));
			}
		} x = in.nextInt() x in.nextInt() in.nextInt in y = in.nextInt() y in.nextInt() in.nextInt in if( x == 0 && y == 0){
				break;
			}else if (x <= y ){
				System.out.println(String.valueOf(x) + ' ' + String.valueOf(y));
			} else {
				System.out.println(String.valueOf(y) + ' ' + String.valueOf(x));
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				break;
			} break; if (x <= y ){
				System.out.println(String.valueOf(x) + ' ' + String.valueOf(y));
			} else {
				System.out.println(String.valueOf(y) + ' ' + String.valueOf(x));
			} x <= y x y {
				System.out.println(String.valueOf(x) + ' ' + String.valueOf(y));
			} System.out.println(String.valueOf(x) + ' ' + String.valueOf(y)) System.out.println System.out System System.out String.valueOf(x) + ' ' + String.valueOf(y) String.valueOf(x) + ' ' + String.valueOf(y) String.valueOf(x) String.valueOf String x ' ' String.valueOf(y) String.valueOf String y {
				System.out.println(String.valueOf(y) + ' ' + String.valueOf(x));
			} System.out.println(String.valueOf(y) + ' ' + String.valueOf(x)) System.out.println System.out System System.out String.valueOf(y) + ' ' + String.valueOf(x) String.valueOf(y) + ' ' + String.valueOf(x) String.valueOf(y) String.valueOf String y ' ' String.valueOf(x) String.valueOf String x String[] args args
import java.util.*;

class Main{
	public static void main (String[] args ){
		int x,y;
		int z = 0;
		Scanner in = new Scanner(System.in);
		while(true){
			x = in.nextInt();
			y = in.nextInt();
			if( x == 0 && y == 0){
				break;
			}else if (x <= y ){
				System.out.println(String.valueOf(x) + ' ' + String.valueOf(y));
			} else {
				System.out.println(String.valueOf(y) + ' ' + String.valueOf(x));
			}
		}
	}
}