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

public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		String str = "";
		try {
			while ((str = in.readLine()) != null) {
				if (str.equals("0 0")) break;
				String[] ab = str.split(" ");
				
				int[] numbers = new int[2];
				numbers[0] = Integer.parseInt(ab[0]);
				numbers[1] = Integer.parseInt(ab[1]);
				
				Arrays.sort(numbers);
				System.out.println(numbers[0] + " " + numbers[1]);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		String str = "";
		try {
			while ((str = in.readLine()) != null) {
				if (str.equals("0 0")) break;
				String[] ab = str.split(" ");
				
				int[] numbers = new int[2];
				numbers[0] = Integer.parseInt(ab[0]);
				numbers[1] = Integer.parseInt(ab[1]);
				
				Arrays.sort(numbers);
				System.out.println(numbers[0] + " " + numbers[1]);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} Main public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		String str = "";
		try {
			while ((str = in.readLine()) != null) {
				if (str.equals("0 0")) break;
				String[] ab = str.split(" ");
				
				int[] numbers = new int[2];
				numbers[0] = Integer.parseInt(ab[0]);
				numbers[1] = Integer.parseInt(ab[1]);
				
				Arrays.sort(numbers);
				System.out.println(numbers[0] + " " + numbers[1]);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		String str = "";
		try {
			while ((str = in.readLine()) != null) {
				if (str.equals("0 0")) break;
				String[] ab = str.split(" ");
				
				int[] numbers = new int[2];
				numbers[0] = Integer.parseInt(ab[0]);
				numbers[1] = Integer.parseInt(ab[1]);
				
				Arrays.sort(numbers);
				System.out.println(numbers[0] + " " + numbers[1]);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String str = ""; str "" try {
			while ((str = in.readLine()) != null) {
				if (str.equals("0 0")) break;
				String[] ab = str.split(" ");
				
				int[] numbers = new int[2];
				numbers[0] = Integer.parseInt(ab[0]);
				numbers[1] = Integer.parseInt(ab[1]);
				
				Arrays.sort(numbers);
				System.out.println(numbers[0] + " " + numbers[1]);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} NumberFormatException e {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} IOException e {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			while ((str = in.readLine()) != null) {
				if (str.equals("0 0")) break;
				String[] ab = str.split(" ");
				
				int[] numbers = new int[2];
				numbers[0] = Integer.parseInt(ab[0]);
				numbers[1] = Integer.parseInt(ab[1]);
				
				Arrays.sort(numbers);
				System.out.println(numbers[0] + " " + numbers[1]);
			}
		} while ((str = in.readLine()) != null) {
				if (str.equals("0 0")) break;
				String[] ab = str.split(" ");
				
				int[] numbers = new int[2];
				numbers[0] = Integer.parseInt(ab[0]);
				numbers[1] = Integer.parseInt(ab[1]);
				
				Arrays.sort(numbers);
				System.out.println(numbers[0] + " " + numbers[1]);
			} (str = in.readLine()) != null (str = in.readLine()) str in.readLine() in.readLine in null {
				if (str.equals("0 0")) break;
				String[] ab = str.split(" ");
				
				int[] numbers = new int[2];
				numbers[0] = Integer.parseInt(ab[0]);
				numbers[1] = Integer.parseInt(ab[1]);
				
				Arrays.sort(numbers);
				System.out.println(numbers[0] + " " + numbers[1]);
			} if (str.equals("0 0")) break; str.equals("0 0") str.equals str "0 0" break; String[] ab = str.split(" "); ab str.split(" ") str.split str " " int[] numbers = new int[2]; numbers new int[2] 2 numbers[0] = Integer.parseInt(ab[0]) numbers[0] numbers 0 Integer.parseInt(ab[0]) Integer.parseInt Integer ab[0] ab 0 numbers[1] = Integer.parseInt(ab[1]) numbers[1] numbers 1 Integer.parseInt(ab[1]) Integer.parseInt Integer ab[1] ab 1 Arrays.sort(numbers) Arrays.sort Arrays numbers System.out.println(numbers[0] + " " + numbers[1]) System.out.println System.out System System.out numbers[0] + " " + numbers[1] numbers[0] + " " + numbers[1] numbers[0] numbers 0 " " numbers[1] numbers 1 String[] args args public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		String str = "";
		try {
			while ((str = in.readLine()) != null) {
				if (str.equals("0 0")) break;
				String[] ab = str.split(" ");
				
				int[] numbers = new int[2];
				numbers[0] = Integer.parseInt(ab[0]);
				numbers[1] = Integer.parseInt(ab[1]);
				
				Arrays.sort(numbers);
				System.out.println(numbers[0] + " " + numbers[1]);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		String str = "";
		try {
			while ((str = in.readLine()) != null) {
				if (str.equals("0 0")) break;
				String[] ab = str.split(" ");
				
				int[] numbers = new int[2];
				numbers[0] = Integer.parseInt(ab[0]);
				numbers[1] = Integer.parseInt(ab[1]);
				
				Arrays.sort(numbers);
				System.out.println(numbers[0] + " " + numbers[1]);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		String str = "";
		try {
			while ((str = in.readLine()) != null) {
				if (str.equals("0 0")) break;
				String[] ab = str.split(" ");
				
				int[] numbers = new int[2];
				numbers[0] = Integer.parseInt(ab[0]);
				numbers[1] = Integer.parseInt(ab[1]);
				
				Arrays.sort(numbers);
				System.out.println(numbers[0] + " " + numbers[1]);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}