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

public class Main {
	
	public static void main(String[] args) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			int i = 1;
			while (true) {
				String str = reader.readLine();
				String[] arr = str.split(" ");
				int x = Integer.parseInt(arr[0]);
				int y = Integer.parseInt(arr[1]);
				int temp;
				
				if (x > y) {
					temp = x;
					x = y;
					y = temp;
				}
				
				if (x == 0 && y == 0) {
					break;
				}
				System.out.println(x + " " + y);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	
	public static void main(String[] args) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			int i = 1;
			while (true) {
				String str = reader.readLine();
				String[] arr = str.split(" ");
				int x = Integer.parseInt(arr[0]);
				int y = Integer.parseInt(arr[1]);
				int temp;
				
				if (x > y) {
					temp = x;
					x = y;
					y = temp;
				}
				
				if (x == 0 && y == 0) {
					break;
				}
				System.out.println(x + " " + y);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

} Main public static void main(String[] args) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			int i = 1;
			while (true) {
				String str = reader.readLine();
				String[] arr = str.split(" ");
				int x = Integer.parseInt(arr[0]);
				int y = Integer.parseInt(arr[1]);
				int temp;
				
				if (x > y) {
					temp = x;
					x = y;
					y = temp;
				}
				
				if (x == 0 && y == 0) {
					break;
				}
				System.out.println(x + " " + y);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	} main {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			int i = 1;
			while (true) {
				String str = reader.readLine();
				String[] arr = str.split(" ");
				int x = Integer.parseInt(arr[0]);
				int y = Integer.parseInt(arr[1]);
				int temp;
				
				if (x > y) {
					temp = x;
					x = y;
					y = temp;
				}
				
				if (x == 0 && y == 0) {
					break;
				}
				System.out.println(x + " " + y);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	} try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			int i = 1;
			while (true) {
				String str = reader.readLine();
				String[] arr = str.split(" ");
				int x = Integer.parseInt(arr[0]);
				int y = Integer.parseInt(arr[1]);
				int temp;
				
				if (x > y) {
					temp = x;
					x = y;
					y = temp;
				}
				
				if (x == 0 && y == 0) {
					break;
				}
				System.out.println(x + " " + y);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			int i = 1;
			while (true) {
				String str = reader.readLine();
				String[] arr = str.split(" ");
				int x = Integer.parseInt(arr[0]);
				int y = Integer.parseInt(arr[1]);
				int temp;
				
				if (x > y) {
					temp = x;
					x = y;
					y = temp;
				}
				
				if (x == 0 && y == 0) {
					break;
				}
				System.out.println(x + " " + y);
			}
		} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) int i = 1; i 1 while (true) {
				String str = reader.readLine();
				String[] arr = str.split(" ");
				int x = Integer.parseInt(arr[0]);
				int y = Integer.parseInt(arr[1]);
				int temp;
				
				if (x > y) {
					temp = x;
					x = y;
					y = temp;
				}
				
				if (x == 0 && y == 0) {
					break;
				}
				System.out.println(x + " " + y);
			} true {
				String str = reader.readLine();
				String[] arr = str.split(" ");
				int x = Integer.parseInt(arr[0]);
				int y = Integer.parseInt(arr[1]);
				int temp;
				
				if (x > y) {
					temp = x;
					x = y;
					y = temp;
				}
				
				if (x == 0 && y == 0) {
					break;
				}
				System.out.println(x + " " + y);
			} String str = reader.readLine(); str reader.readLine() reader.readLine reader String[] arr = str.split(" "); arr str.split(" ") str.split str " " int x = Integer.parseInt(arr[0]); x Integer.parseInt(arr[0]) Integer.parseInt Integer arr[0] arr 0 int y = Integer.parseInt(arr[1]); y Integer.parseInt(arr[1]) Integer.parseInt Integer arr[1] arr 1 int temp; temp if (x > y) {
					temp = x;
					x = y;
					y = temp;
				} x > y x y {
					temp = x;
					x = y;
					y = temp;
				} temp = x temp x x = y x y y = temp y temp if (x == 0 && y == 0) {
					break;
				} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
					break;
				} break; System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y String[] args args public class Main {
	
	public static void main(String[] args) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			int i = 1;
			while (true) {
				String str = reader.readLine();
				String[] arr = str.split(" ");
				int x = Integer.parseInt(arr[0]);
				int y = Integer.parseInt(arr[1]);
				int temp;
				
				if (x > y) {
					temp = x;
					x = y;
					y = temp;
				}
				
				if (x == 0 && y == 0) {
					break;
				}
				System.out.println(x + " " + y);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

} public class Main {
	
	public static void main(String[] args) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			int i = 1;
			while (true) {
				String str = reader.readLine();
				String[] arr = str.split(" ");
				int x = Integer.parseInt(arr[0]);
				int y = Integer.parseInt(arr[1]);
				int temp;
				
				if (x > y) {
					temp = x;
					x = y;
					y = temp;
				}
				
				if (x == 0 && y == 0) {
					break;
				}
				System.out.println(x + " " + y);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	
	public static void main(String[] args) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			int i = 1;
			while (true) {
				String str = reader.readLine();
				String[] arr = str.split(" ");
				int x = Integer.parseInt(arr[0]);
				int y = Integer.parseInt(arr[1]);
				int temp;
				
				if (x > y) {
					temp = x;
					x = y;
					y = temp;
				}
				
				if (x == 0 && y == 0) {
					break;
				}
				System.out.println(x + " " + y);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}