import java.util.*;

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

		for(;;){
			int x = sc.nextInt();
			int y = sc.nextInt();
			
			if(x == 0 && y == 0)
				break;
			
			if(x > y){
				change = x;
				x = y;
				y = change;
			}
			
			System.out.println(x +" "+y);
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		int change;
		Scanner sc = new Scanner(System.in);

		for(;;){
			int x = sc.nextInt();
			int y = sc.nextInt();
			
			if(x == 0 && y == 0)
				break;
			
			if(x > y){
				change = x;
				x = y;
				y = change;
			}
			
			System.out.println(x +" "+y);
		}
	}
} Main public static void main(String[] args){
		int change;
		Scanner sc = new Scanner(System.in);

		for(;;){
			int x = sc.nextInt();
			int y = sc.nextInt();
			
			if(x == 0 && y == 0)
				break;
			
			if(x > y){
				change = x;
				x = y;
				y = change;
			}
			
			System.out.println(x +" "+y);
		}
	} main {
		int change;
		Scanner sc = new Scanner(System.in);

		for(;;){
			int x = sc.nextInt();
			int y = sc.nextInt();
			
			if(x == 0 && y == 0)
				break;
			
			if(x > y){
				change = x;
				x = y;
				y = change;
			}
			
			System.out.println(x +" "+y);
		}
	} int change; change Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for(;;){
			int x = sc.nextInt();
			int y = sc.nextInt();
			
			if(x == 0 && y == 0)
				break;
			
			if(x > y){
				change = x;
				x = y;
				y = change;
			}
			
			System.out.println(x +" "+y);
		} ; {
			int x = sc.nextInt();
			int y = sc.nextInt();
			
			if(x == 0 && y == 0)
				break;
			
			if(x > y){
				change = x;
				x = y;
				y = change;
			}
			
			System.out.println(x +" "+y);
		} {
			int x = sc.nextInt();
			int y = sc.nextInt();
			
			if(x == 0 && y == 0)
				break;
			
			if(x > y){
				change = x;
				x = y;
				y = change;
			}
			
			System.out.println(x +" "+y);
		} int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc if(x == 0 && y == 0)
				break; x == 0 && y == 0 x == 0 x 0 y == 0 y 0 break; if(x > y){
				change = x;
				x = y;
				y = change;
			} x > y x y {
				change = x;
				x = y;
				y = change;
			} change = x change x x = y x y y = change y change System.out.println(x +" "+y) System.out.println System.out System System.out x +" "+y x +" "+y x " " y String[] args args public class Main {
	public static void main(String[] args){
		int change;
		Scanner sc = new Scanner(System.in);

		for(;;){
			int x = sc.nextInt();
			int y = sc.nextInt();
			
			if(x == 0 && y == 0)
				break;
			
			if(x > y){
				change = x;
				x = y;
				y = change;
			}
			
			System.out.println(x +" "+y);
		}
	}
} public class Main {
	public static void main(String[] args){
		int change;
		Scanner sc = new Scanner(System.in);

		for(;;){
			int x = sc.nextInt();
			int y = sc.nextInt();
			
			if(x == 0 && y == 0)
				break;
			
			if(x > y){
				change = x;
				x = y;
				y = change;
			}
			
			System.out.println(x +" "+y);
		}
	}
} Main
import java.util.*;

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

		for(;;){
			int x = sc.nextInt();
			int y = sc.nextInt();
			
			if(x == 0 && y == 0)
				break;
			
			if(x > y){
				change = x;
				x = y;
				y = change;
			}
			
			System.out.println(x +" "+y);
		}
	}
}