import java.io.*;
import java.util.StringTokenizer;

class Main {
	public static void main (String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;
		int count = 1;

		try {
			while (true) {
				buf = br.readLine();
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				if (a==0 && b==0) break;
				else if (a<b) System.out.println(a+" "+b);
				else System.out.println(b+" "+a);
			}
		} catch (Exception e) {
			//Exception
		}
	}
} import java.io.*; io.* java import java.util.StringTokenizer; StringTokenizer java.util class Main {
	public static void main (String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;
		int count = 1;

		try {
			while (true) {
				buf = br.readLine();
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				if (a==0 && b==0) break;
				else if (a<b) System.out.println(a+" "+b);
				else System.out.println(b+" "+a);
			}
		} catch (Exception e) {
			//Exception
		}
	}
} Main public static void main (String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;
		int count = 1;

		try {
			while (true) {
				buf = br.readLine();
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				if (a==0 && b==0) break;
				else if (a<b) System.out.println(a+" "+b);
				else System.out.println(b+" "+a);
			}
		} catch (Exception e) {
			//Exception
		}
	} main {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;
		int count = 1;

		try {
			while (true) {
				buf = br.readLine();
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				if (a==0 && b==0) break;
				else if (a<b) System.out.println(a+" "+b);
				else System.out.println(b+" "+a);
			}
		} catch (Exception e) {
			//Exception
		}
	} InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) String buf; buf int count = 1; count 1 try {
			while (true) {
				buf = br.readLine();
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				if (a==0 && b==0) break;
				else if (a<b) System.out.println(a+" "+b);
				else System.out.println(b+" "+a);
			}
		} catch (Exception e) {
			//Exception
		} catch (Exception e) {
			//Exception
		} Exception e {
			//Exception
		} {
			while (true) {
				buf = br.readLine();
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				if (a==0 && b==0) break;
				else if (a<b) System.out.println(a+" "+b);
				else System.out.println(b+" "+a);
			}
		} while (true) {
				buf = br.readLine();
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				if (a==0 && b==0) break;
				else if (a<b) System.out.println(a+" "+b);
				else System.out.println(b+" "+a);
			} true {
				buf = br.readLine();
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				if (a==0 && b==0) break;
				else if (a<b) System.out.println(a+" "+b);
				else System.out.println(b+" "+a);
			} buf = br.readLine() buf br.readLine() br.readLine br StringTokenizer st = new StringTokenizer(buf); st new StringTokenizer(buf) int a = Integer.parseInt(st.nextToken()); a Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int b = Integer.parseInt(st.nextToken()); b Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st if (a==0 && b==0) break;
				else if (a<b) System.out.println(a+" "+b);
				else System.out.println(b+" "+a); a==0 && b==0 a==0 a 0 b==0 b 0 break; if (a<b) System.out.println(a+" "+b);
				else System.out.println(b+" "+a); a<b a b System.out.println(a+" "+b) System.out.println System.out System System.out a+" "+b a+" "+b a " " b System.out.println(b+" "+a) System.out.println System.out System System.out b+" "+a b+" "+a b " " a String args[] args
import java.io.*;
import java.util.StringTokenizer;

class Main {
	public static void main (String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;
		int count = 1;

		try {
			while (true) {
				buf = br.readLine();
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				if (a==0 && b==0) break;
				else if (a<b) System.out.println(a+" "+b);
				else System.out.println(b+" "+a);
			}
		} catch (Exception e) {
			//Exception
		}
	}
}