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

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		List<Integer> x = new ArrayList<Integer>();
		List<Integer> y = new ArrayList<Integer>();

		for (;;) {
			int xNum = scan.nextInt();
			int yNum = scan.nextInt();
			if (xNum == 0&& yNum == 0) {
				break;
			}
			x.add(xNum);
			y.add(yNum);
		}

		for (int i = 0; i < x.size(); i++) {
			System.out.println(x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i));
		}
		scan.close();

	}

} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		List<Integer> x = new ArrayList<Integer>();
		List<Integer> y = new ArrayList<Integer>();

		for (;;) {
			int xNum = scan.nextInt();
			int yNum = scan.nextInt();
			if (xNum == 0&& yNum == 0) {
				break;
			}
			x.add(xNum);
			y.add(yNum);
		}

		for (int i = 0; i < x.size(); i++) {
			System.out.println(x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i));
		}
		scan.close();

	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		List<Integer> x = new ArrayList<Integer>();
		List<Integer> y = new ArrayList<Integer>();

		for (;;) {
			int xNum = scan.nextInt();
			int yNum = scan.nextInt();
			if (xNum == 0&& yNum == 0) {
				break;
			}
			x.add(xNum);
			y.add(yNum);
		}

		for (int i = 0; i < x.size(); i++) {
			System.out.println(x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i));
		}
		scan.close();

	} main {
		Scanner scan = new Scanner(System.in);		

		List<Integer> x = new ArrayList<Integer>();
		List<Integer> y = new ArrayList<Integer>();

		for (;;) {
			int xNum = scan.nextInt();
			int yNum = scan.nextInt();
			if (xNum == 0&& yNum == 0) {
				break;
			}
			x.add(xNum);
			y.add(yNum);
		}

		for (int i = 0; i < x.size(); i++) {
			System.out.println(x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i));
		}
		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) List<Integer> x = new ArrayList<Integer>(); x new ArrayList<Integer>() List<Integer> y = new ArrayList<Integer>(); y new ArrayList<Integer>() for (;;) {
			int xNum = scan.nextInt();
			int yNum = scan.nextInt();
			if (xNum == 0&& yNum == 0) {
				break;
			}
			x.add(xNum);
			y.add(yNum);
		} ; {
			int xNum = scan.nextInt();
			int yNum = scan.nextInt();
			if (xNum == 0&& yNum == 0) {
				break;
			}
			x.add(xNum);
			y.add(yNum);
		} {
			int xNum = scan.nextInt();
			int yNum = scan.nextInt();
			if (xNum == 0&& yNum == 0) {
				break;
			}
			x.add(xNum);
			y.add(yNum);
		} int xNum = scan.nextInt(); xNum scan.nextInt() scan.nextInt scan int yNum = scan.nextInt(); yNum scan.nextInt() scan.nextInt scan if (xNum == 0&& yNum == 0) {
				break;
			} xNum == 0&& yNum == 0 xNum == 0 xNum 0 yNum == 0 yNum 0 {
				break;
			} break; x.add(xNum) x.add x xNum y.add(yNum) y.add y yNum for (int i = 0; i < x.size(); i++) {
			System.out.println(x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i));
		} int i = 0; int i = 0; i 0 i < x.size() i x.size() x.size x i++ i++ i {
			System.out.println(x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i));
		} {
			System.out.println(x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i));
		} System.out.println(x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i)) System.out.println System.out System System.out x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i) x.get(i) < y.get(i) x.get(i) x.get x i y.get(i) y.get y i x.get(i) + " " + y.get(i) x.get(i) + " " + y.get(i) x.get(i) x.get x i " " y.get(i) y.get y i y.get(i) + " " + x.get(i) y.get(i) + " " + x.get(i) y.get(i) y.get y i " " x.get(i) x.get x i scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		List<Integer> x = new ArrayList<Integer>();
		List<Integer> y = new ArrayList<Integer>();

		for (;;) {
			int xNum = scan.nextInt();
			int yNum = scan.nextInt();
			if (xNum == 0&& yNum == 0) {
				break;
			}
			x.add(xNum);
			y.add(yNum);
		}

		for (int i = 0; i < x.size(); i++) {
			System.out.println(x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i));
		}
		scan.close();

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		List<Integer> x = new ArrayList<Integer>();
		List<Integer> y = new ArrayList<Integer>();

		for (;;) {
			int xNum = scan.nextInt();
			int yNum = scan.nextInt();
			if (xNum == 0&& yNum == 0) {
				break;
			}
			x.add(xNum);
			y.add(yNum);
		}

		for (int i = 0; i < x.size(); i++) {
			System.out.println(x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i));
		}
		scan.close();

	}

} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		List<Integer> x = new ArrayList<Integer>();
		List<Integer> y = new ArrayList<Integer>();

		for (;;) {
			int xNum = scan.nextInt();
			int yNum = scan.nextInt();
			if (xNum == 0&& yNum == 0) {
				break;
			}
			x.add(xNum);
			y.add(yNum);
		}

		for (int i = 0; i < x.size(); i++) {
			System.out.println(x.get(i) < y.get(i) ? x.get(i) + " " + y.get(i) : y.get(i) + " " + x.get(i));
		}
		scan.close();

	}

}