import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i = 1;
		while(i == 1){
			int X = sc.nextInt();
			int Y = sc.nextInt();
			if(X > Y){
				int tmp;
				tmp = X;
				X = Y;
				Y = tmp;
			}
			if(X == 0 && Y == 0)
				break;
			else
				System.out.println(X +" "+ Y);
		}
		sc.close();
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i = 1;
		while(i == 1){
			int X = sc.nextInt();
			int Y = sc.nextInt();
			if(X > Y){
				int tmp;
				tmp = X;
				X = Y;
				Y = tmp;
			}
			if(X == 0 && Y == 0)
				break;
			else
				System.out.println(X +" "+ Y);
		}
		sc.close();
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i = 1;
		while(i == 1){
			int X = sc.nextInt();
			int Y = sc.nextInt();
			if(X > Y){
				int tmp;
				tmp = X;
				X = Y;
				Y = tmp;
			}
			if(X == 0 && Y == 0)
				break;
			else
				System.out.println(X +" "+ Y);
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int i = 1;
		while(i == 1){
			int X = sc.nextInt();
			int Y = sc.nextInt();
			if(X > Y){
				int tmp;
				tmp = X;
				X = Y;
				Y = tmp;
			}
			if(X == 0 && Y == 0)
				break;
			else
				System.out.println(X +" "+ Y);
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int i = 1; i 1 while(i == 1){
			int X = sc.nextInt();
			int Y = sc.nextInt();
			if(X > Y){
				int tmp;
				tmp = X;
				X = Y;
				Y = tmp;
			}
			if(X == 0 && Y == 0)
				break;
			else
				System.out.println(X +" "+ Y);
		} i == 1 i 1 {
			int X = sc.nextInt();
			int Y = sc.nextInt();
			if(X > Y){
				int tmp;
				tmp = X;
				X = Y;
				Y = tmp;
			}
			if(X == 0 && Y == 0)
				break;
			else
				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 > Y){
				int tmp;
				tmp = X;
				X = Y;
				Y = tmp;
			} X > Y X Y {
				int tmp;
				tmp = X;
				X = Y;
				Y = tmp;
			} int tmp; tmp tmp = X tmp X X = Y X Y Y = tmp Y tmp if(X == 0 && Y == 0)
				break;
			else
				System.out.println(X +" "+ Y); X == 0 && Y == 0 X == 0 X 0 Y == 0 Y 0 break; System.out.println(X +" "+ Y) System.out.println System.out System System.out X +" "+ Y X +" "+ Y X " " Y sc.close() sc.close sc String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i = 1;
		while(i == 1){
			int X = sc.nextInt();
			int Y = sc.nextInt();
			if(X > Y){
				int tmp;
				tmp = X;
				X = Y;
				Y = tmp;
			}
			if(X == 0 && Y == 0)
				break;
			else
				System.out.println(X +" "+ Y);
		}
		sc.close();
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i = 1;
		while(i == 1){
			int X = sc.nextInt();
			int Y = sc.nextInt();
			if(X > Y){
				int tmp;
				tmp = X;
				X = Y;
				Y = tmp;
			}
			if(X == 0 && Y == 0)
				break;
			else
				System.out.println(X +" "+ Y);
		}
		sc.close();
	}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i = 1;
		while(i == 1){
			int X = sc.nextInt();
			int Y = sc.nextInt();
			if(X > Y){
				int tmp;
				tmp = X;
				X = Y;
				Y = tmp;
			}
			if(X == 0 && Y == 0)
				break;
			else
				System.out.println(X +" "+ Y);
		}
		sc.close();
	}
}