import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int x = sc.nextInt();
            int y = sc.nextInt();
			
			if ( x == 0 && y == 0)
				break;
			
			int small = 0;
			int large = 0;
			
			if ( x < y || x == y ) {
				small = x;
				large = y;
			} else if ( x > y ) {
				small = y;
				large = x;
			}
			
            System.out.println(String.format("%d %d", small, large));
        }

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int x = sc.nextInt();
            int y = sc.nextInt();
			
			if ( x == 0 && y == 0)
				break;
			
			int small = 0;
			int large = 0;
			
			if ( x < y || x == y ) {
				small = x;
				large = y;
			} else if ( x > y ) {
				small = y;
				large = x;
			}
			
            System.out.println(String.format("%d %d", small, large));
        }

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int x = sc.nextInt();
            int y = sc.nextInt();
			
			if ( x == 0 && y == 0)
				break;
			
			int small = 0;
			int large = 0;
			
			if ( x < y || x == y ) {
				small = x;
				large = y;
			} else if ( x > y ) {
				small = y;
				large = x;
			}
			
            System.out.println(String.format("%d %d", small, large));
        }

	} main {
		Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int x = sc.nextInt();
            int y = sc.nextInt();
			
			if ( x == 0 && y == 0)
				break;
			
			int small = 0;
			int large = 0;
			
			if ( x < y || x == y ) {
				small = x;
				large = y;
			} else if ( x > y ) {
				small = y;
				large = x;
			}
			
            System.out.println(String.format("%d %d", small, large));
        }

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
            int x = sc.nextInt();
            int y = sc.nextInt();
			
			if ( x == 0 && y == 0)
				break;
			
			int small = 0;
			int large = 0;
			
			if ( x < y || x == y ) {
				small = x;
				large = y;
			} else if ( x > y ) {
				small = y;
				large = x;
			}
			
            System.out.println(String.format("%d %d", small, large));
        } sc.hasNext() sc.hasNext sc {
            int x = sc.nextInt();
            int y = sc.nextInt();
			
			if ( x == 0 && y == 0)
				break;
			
			int small = 0;
			int large = 0;
			
			if ( x < y || x == y ) {
				small = x;
				large = y;
			} else if ( x > y ) {
				small = y;
				large = x;
			}
			
            System.out.println(String.format("%d %d", small, large));
        } 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; int small = 0; small 0 int large = 0; large 0 if ( x < y || x == y ) {
				small = x;
				large = y;
			} else if ( x > y ) {
				small = y;
				large = x;
			} x < y || x == y x < y x y x == y x y {
				small = x;
				large = y;
			} small = x small x large = y large y if ( x > y ) {
				small = y;
				large = x;
			} x > y x y {
				small = y;
				large = x;
			} small = y small y large = x large x System.out.println(String.format("%d %d", small, large)) System.out.println System.out System System.out String.format("%d %d", small, large) String.format String "%d %d" small large String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int x = sc.nextInt();
            int y = sc.nextInt();
			
			if ( x == 0 && y == 0)
				break;
			
			int small = 0;
			int large = 0;
			
			if ( x < y || x == y ) {
				small = x;
				large = y;
			} else if ( x > y ) {
				small = y;
				large = x;
			}
			
            System.out.println(String.format("%d %d", small, large));
        }

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int x = sc.nextInt();
            int y = sc.nextInt();
			
			if ( x == 0 && y == 0)
				break;
			
			int small = 0;
			int large = 0;
			
			if ( x < y || x == y ) {
				small = x;
				large = y;
			} else if ( x > y ) {
				small = y;
				large = x;
			}
			
            System.out.println(String.format("%d %d", small, large));
        }

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int x = sc.nextInt();
            int y = sc.nextInt();
			
			if ( x == 0 && y == 0)
				break;
			
			int small = 0;
			int large = 0;
			
			if ( x < y || x == y ) {
				small = x;
				large = y;
			} else if ( x > y ) {
				small = y;
				large = x;
			}
			
            System.out.println(String.format("%d %d", small, large));
        }

	}
}