import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		boolean zeroFlag = true;

		while (zeroFlag) {
			String[] hikakuStr = line.split("[\\s]+");
			int x = Integer.parseInt(hikakuStr[0]);
			int y = Integer.parseInt(hikakuStr[1]);

			if (x == 0 && y == 0) {
				zeroFlag = false;
			} else if (x < y) {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} else {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			}
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		boolean zeroFlag = true;

		while (zeroFlag) {
			String[] hikakuStr = line.split("[\\s]+");
			int x = Integer.parseInt(hikakuStr[0]);
			int y = Integer.parseInt(hikakuStr[1]);

			if (x == 0 && y == 0) {
				zeroFlag = false;
			} else if (x < y) {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} else {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			}
		}
	}
} Main public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		boolean zeroFlag = true;

		while (zeroFlag) {
			String[] hikakuStr = line.split("[\\s]+");
			int x = Integer.parseInt(hikakuStr[0]);
			int y = Integer.parseInt(hikakuStr[1]);

			if (x == 0 && y == 0) {
				zeroFlag = false;
			} else if (x < y) {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} else {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			}
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		boolean zeroFlag = true;

		while (zeroFlag) {
			String[] hikakuStr = line.split("[\\s]+");
			int x = Integer.parseInt(hikakuStr[0]);
			int y = Integer.parseInt(hikakuStr[1]);

			if (x == 0 && y == 0) {
				zeroFlag = false;
			} else if (x < y) {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} else {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br boolean zeroFlag = true; zeroFlag true while (zeroFlag) {
			String[] hikakuStr = line.split("[\\s]+");
			int x = Integer.parseInt(hikakuStr[0]);
			int y = Integer.parseInt(hikakuStr[1]);

			if (x == 0 && y == 0) {
				zeroFlag = false;
			} else if (x < y) {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} else {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			}
		} zeroFlag {
			String[] hikakuStr = line.split("[\\s]+");
			int x = Integer.parseInt(hikakuStr[0]);
			int y = Integer.parseInt(hikakuStr[1]);

			if (x == 0 && y == 0) {
				zeroFlag = false;
			} else if (x < y) {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} else {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			}
		} String[] hikakuStr = line.split("[\\s]+"); hikakuStr line.split("[\\s]+") line.split line "[\\s]+" int x = Integer.parseInt(hikakuStr[0]); x Integer.parseInt(hikakuStr[0]) Integer.parseInt Integer hikakuStr[0] hikakuStr 0 int y = Integer.parseInt(hikakuStr[1]); y Integer.parseInt(hikakuStr[1]) Integer.parseInt Integer hikakuStr[1] hikakuStr 1 if (x == 0 && y == 0) {
				zeroFlag = false;
			} else if (x < y) {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} else {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				zeroFlag = false;
			} zeroFlag = false zeroFlag false if (x < y) {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} else {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} x < y x y {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y line = br.readLine() line br.readLine() br.readLine br hikakuStr = line.split("[\\s]+") hikakuStr line.split("[\\s]+") line.split line "[\\s]+" {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x line = br.readLine() line br.readLine() br.readLine br hikakuStr = line.split("[\\s]+") hikakuStr line.split("[\\s]+") line.split line "[\\s]+" String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		boolean zeroFlag = true;

		while (zeroFlag) {
			String[] hikakuStr = line.split("[\\s]+");
			int x = Integer.parseInt(hikakuStr[0]);
			int y = Integer.parseInt(hikakuStr[1]);

			if (x == 0 && y == 0) {
				zeroFlag = false;
			} else if (x < y) {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} else {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			}
		}
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		boolean zeroFlag = true;

		while (zeroFlag) {
			String[] hikakuStr = line.split("[\\s]+");
			int x = Integer.parseInt(hikakuStr[0]);
			int y = Integer.parseInt(hikakuStr[1]);

			if (x == 0 && y == 0) {
				zeroFlag = false;
			} else if (x < y) {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} else {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			}
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		boolean zeroFlag = true;

		while (zeroFlag) {
			String[] hikakuStr = line.split("[\\s]+");
			int x = Integer.parseInt(hikakuStr[0]);
			int y = Integer.parseInt(hikakuStr[1]);

			if (x == 0 && y == 0) {
				zeroFlag = false;
			} else if (x < y) {
				System.out.println(x + " " + y);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			} else {
				System.out.println(y + " " + x);
				line = br.readLine();
				hikakuStr = line.split("[\\s]+");
			}
		}
	}
}