import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args)  {

		Scanner scanner = new Scanner( System.in );

		ArrayList<Integer> nums1 = new ArrayList<Integer>();
		ArrayList<Integer> nums2 = new ArrayList<Integer>();

		while ( true ) {
			String inputText1 = scanner.next();
			String inputText2 = scanner.next();

			int x1 = Integer.parseInt(inputText1);
			int x2 = Integer.parseInt(inputText2);

			if ( x1 == 0 && x2 == 0 ) {
				break;
			}

			if ( x1 <= x2 ) {
				nums1.add(x1);
				nums2.add(x2);
			}
			else {
				nums1.add(x2);
				nums2.add(x1);
			}
		}

		for ( int i = 0; i < nums1.size(); i++ ) {
			System.out.println(nums1.get(i) + " " + nums2.get(i));
		}

		scanner.close();
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args)  {

		Scanner scanner = new Scanner( System.in );

		ArrayList<Integer> nums1 = new ArrayList<Integer>();
		ArrayList<Integer> nums2 = new ArrayList<Integer>();

		while ( true ) {
			String inputText1 = scanner.next();
			String inputText2 = scanner.next();

			int x1 = Integer.parseInt(inputText1);
			int x2 = Integer.parseInt(inputText2);

			if ( x1 == 0 && x2 == 0 ) {
				break;
			}

			if ( x1 <= x2 ) {
				nums1.add(x1);
				nums2.add(x2);
			}
			else {
				nums1.add(x2);
				nums2.add(x1);
			}
		}

		for ( int i = 0; i < nums1.size(); i++ ) {
			System.out.println(nums1.get(i) + " " + nums2.get(i));
		}

		scanner.close();
	}
} Main public static void main(String[] args)  {

		Scanner scanner = new Scanner( System.in );

		ArrayList<Integer> nums1 = new ArrayList<Integer>();
		ArrayList<Integer> nums2 = new ArrayList<Integer>();

		while ( true ) {
			String inputText1 = scanner.next();
			String inputText2 = scanner.next();

			int x1 = Integer.parseInt(inputText1);
			int x2 = Integer.parseInt(inputText2);

			if ( x1 == 0 && x2 == 0 ) {
				break;
			}

			if ( x1 <= x2 ) {
				nums1.add(x1);
				nums2.add(x2);
			}
			else {
				nums1.add(x2);
				nums2.add(x1);
			}
		}

		for ( int i = 0; i < nums1.size(); i++ ) {
			System.out.println(nums1.get(i) + " " + nums2.get(i));
		}

		scanner.close();
	} main {

		Scanner scanner = new Scanner( System.in );

		ArrayList<Integer> nums1 = new ArrayList<Integer>();
		ArrayList<Integer> nums2 = new ArrayList<Integer>();

		while ( true ) {
			String inputText1 = scanner.next();
			String inputText2 = scanner.next();

			int x1 = Integer.parseInt(inputText1);
			int x2 = Integer.parseInt(inputText2);

			if ( x1 == 0 && x2 == 0 ) {
				break;
			}

			if ( x1 <= x2 ) {
				nums1.add(x1);
				nums2.add(x2);
			}
			else {
				nums1.add(x2);
				nums2.add(x1);
			}
		}

		for ( int i = 0; i < nums1.size(); i++ ) {
			System.out.println(nums1.get(i) + " " + nums2.get(i));
		}

		scanner.close();
	} Scanner scanner = new Scanner( System.in ); scanner new Scanner( System.in ) ArrayList<Integer> nums1 = new ArrayList<Integer>(); nums1 new ArrayList<Integer>() ArrayList<Integer> nums2 = new ArrayList<Integer>(); nums2 new ArrayList<Integer>() while ( true ) {
			String inputText1 = scanner.next();
			String inputText2 = scanner.next();

			int x1 = Integer.parseInt(inputText1);
			int x2 = Integer.parseInt(inputText2);

			if ( x1 == 0 && x2 == 0 ) {
				break;
			}

			if ( x1 <= x2 ) {
				nums1.add(x1);
				nums2.add(x2);
			}
			else {
				nums1.add(x2);
				nums2.add(x1);
			}
		} true {
			String inputText1 = scanner.next();
			String inputText2 = scanner.next();

			int x1 = Integer.parseInt(inputText1);
			int x2 = Integer.parseInt(inputText2);

			if ( x1 == 0 && x2 == 0 ) {
				break;
			}

			if ( x1 <= x2 ) {
				nums1.add(x1);
				nums2.add(x2);
			}
			else {
				nums1.add(x2);
				nums2.add(x1);
			}
		} String inputText1 = scanner.next(); inputText1 scanner.next() scanner.next scanner String inputText2 = scanner.next(); inputText2 scanner.next() scanner.next scanner int x1 = Integer.parseInt(inputText1); x1 Integer.parseInt(inputText1) Integer.parseInt Integer inputText1 int x2 = Integer.parseInt(inputText2); x2 Integer.parseInt(inputText2) Integer.parseInt Integer inputText2 if ( x1 == 0 && x2 == 0 ) {
				break;
			} x1 == 0 && x2 == 0 x1 == 0 x1 0 x2 == 0 x2 0 {
				break;
			} break; if ( x1 <= x2 ) {
				nums1.add(x1);
				nums2.add(x2);
			}
			else {
				nums1.add(x2);
				nums2.add(x1);
			} x1 <= x2 x1 x2 {
				nums1.add(x1);
				nums2.add(x2);
			} nums1.add(x1) nums1.add nums1 x1 nums2.add(x2) nums2.add nums2 x2 {
				nums1.add(x2);
				nums2.add(x1);
			} nums1.add(x2) nums1.add nums1 x2 nums2.add(x1) nums2.add nums2 x1 for ( int i = 0; i < nums1.size(); i++ ) {
			System.out.println(nums1.get(i) + " " + nums2.get(i));
		} int i = 0; int i = 0; i 0 i < nums1.size() i nums1.size() nums1.size nums1 i++ i++ i {
			System.out.println(nums1.get(i) + " " + nums2.get(i));
		} {
			System.out.println(nums1.get(i) + " " + nums2.get(i));
		} System.out.println(nums1.get(i) + " " + nums2.get(i)) System.out.println System.out System System.out nums1.get(i) + " " + nums2.get(i) nums1.get(i) + " " + nums2.get(i) nums1.get(i) nums1.get nums1 i " " nums2.get(i) nums2.get nums2 i scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args)  {

		Scanner scanner = new Scanner( System.in );

		ArrayList<Integer> nums1 = new ArrayList<Integer>();
		ArrayList<Integer> nums2 = new ArrayList<Integer>();

		while ( true ) {
			String inputText1 = scanner.next();
			String inputText2 = scanner.next();

			int x1 = Integer.parseInt(inputText1);
			int x2 = Integer.parseInt(inputText2);

			if ( x1 == 0 && x2 == 0 ) {
				break;
			}

			if ( x1 <= x2 ) {
				nums1.add(x1);
				nums2.add(x2);
			}
			else {
				nums1.add(x2);
				nums2.add(x1);
			}
		}

		for ( int i = 0; i < nums1.size(); i++ ) {
			System.out.println(nums1.get(i) + " " + nums2.get(i));
		}

		scanner.close();
	}
} public class Main {

	public static void main(String[] args)  {

		Scanner scanner = new Scanner( System.in );

		ArrayList<Integer> nums1 = new ArrayList<Integer>();
		ArrayList<Integer> nums2 = new ArrayList<Integer>();

		while ( true ) {
			String inputText1 = scanner.next();
			String inputText2 = scanner.next();

			int x1 = Integer.parseInt(inputText1);
			int x2 = Integer.parseInt(inputText2);

			if ( x1 == 0 && x2 == 0 ) {
				break;
			}

			if ( x1 <= x2 ) {
				nums1.add(x1);
				nums2.add(x2);
			}
			else {
				nums1.add(x2);
				nums2.add(x1);
			}
		}

		for ( int i = 0; i < nums1.size(); i++ ) {
			System.out.println(nums1.get(i) + " " + nums2.get(i));
		}

		scanner.close();
	}
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args)  {

		Scanner scanner = new Scanner( System.in );

		ArrayList<Integer> nums1 = new ArrayList<Integer>();
		ArrayList<Integer> nums2 = new ArrayList<Integer>();

		while ( true ) {
			String inputText1 = scanner.next();
			String inputText2 = scanner.next();

			int x1 = Integer.parseInt(inputText1);
			int x2 = Integer.parseInt(inputText2);

			if ( x1 == 0 && x2 == 0 ) {
				break;
			}

			if ( x1 <= x2 ) {
				nums1.add(x1);
				nums2.add(x2);
			}
			else {
				nums1.add(x2);
				nums2.add(x1);
			}
		}

		for ( int i = 0; i < nums1.size(); i++ ) {
			System.out.println(nums1.get(i) + " " + nums2.get(i));
		}

		scanner.close();
	}
}