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


public class Main {
	public static void main(String[] args) throws Exception {
try {
	BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
	String input = buf.readLine();
	
	while(true){
		String[] strAry = input.split(" ");
	       int x = Integer.parseInt(strAry[0]);
	       int y = Integer.parseInt(strAry[1]);
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
		int chg = x;
		x = y;
		y = chg;
		}		
		System.out.println(x + " " + y);
		input =buf.readLine();
	}
} catch (Exception e) {
	// TODO: handle exception
}
		 }
    } 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 {
try {
	BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
	String input = buf.readLine();
	
	while(true){
		String[] strAry = input.split(" ");
	       int x = Integer.parseInt(strAry[0]);
	       int y = Integer.parseInt(strAry[1]);
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
		int chg = x;
		x = y;
		y = chg;
		}		
		System.out.println(x + " " + y);
		input =buf.readLine();
	}
} catch (Exception e) {
	// TODO: handle exception
}
		 }
    } Main public static void main(String[] args) throws Exception {
try {
	BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
	String input = buf.readLine();
	
	while(true){
		String[] strAry = input.split(" ");
	       int x = Integer.parseInt(strAry[0]);
	       int y = Integer.parseInt(strAry[1]);
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
		int chg = x;
		x = y;
		y = chg;
		}		
		System.out.println(x + " " + y);
		input =buf.readLine();
	}
} catch (Exception e) {
	// TODO: handle exception
}
		 } main {
try {
	BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
	String input = buf.readLine();
	
	while(true){
		String[] strAry = input.split(" ");
	       int x = Integer.parseInt(strAry[0]);
	       int y = Integer.parseInt(strAry[1]);
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
		int chg = x;
		x = y;
		y = chg;
		}		
		System.out.println(x + " " + y);
		input =buf.readLine();
	}
} catch (Exception e) {
	// TODO: handle exception
}
		 } try {
	BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
	String input = buf.readLine();
	
	while(true){
		String[] strAry = input.split(" ");
	       int x = Integer.parseInt(strAry[0]);
	       int y = Integer.parseInt(strAry[1]);
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
		int chg = x;
		x = y;
		y = chg;
		}		
		System.out.println(x + " " + y);
		input =buf.readLine();
	}
} catch (Exception e) {
	// TODO: handle exception
} catch (Exception e) {
	// TODO: handle exception
} Exception e {
	// TODO: handle exception
} {
	BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
	String input = buf.readLine();
	
	while(true){
		String[] strAry = input.split(" ");
	       int x = Integer.parseInt(strAry[0]);
	       int y = Integer.parseInt(strAry[1]);
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
		int chg = x;
		x = y;
		y = chg;
		}		
		System.out.println(x + " " + y);
		input =buf.readLine();
	}
} BufferedReader buf = new BufferedReader(new InputStreamReader(System.in)); buf new BufferedReader(new InputStreamReader(System.in)) String input = buf.readLine(); input buf.readLine() buf.readLine buf while(true){
		String[] strAry = input.split(" ");
	       int x = Integer.parseInt(strAry[0]);
	       int y = Integer.parseInt(strAry[1]);
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
		int chg = x;
		x = y;
		y = chg;
		}		
		System.out.println(x + " " + y);
		input =buf.readLine();
	} true {
		String[] strAry = input.split(" ");
	       int x = Integer.parseInt(strAry[0]);
	       int y = Integer.parseInt(strAry[1]);
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
		int chg = x;
		x = y;
		y = chg;
		}		
		System.out.println(x + " " + y);
		input =buf.readLine();
	} String[] strAry = input.split(" "); strAry input.split(" ") input.split input " " int x = Integer.parseInt(strAry[0]); x Integer.parseInt(strAry[0]) Integer.parseInt Integer strAry[0] strAry 0 int y = Integer.parseInt(strAry[1]); y Integer.parseInt(strAry[1]) Integer.parseInt Integer strAry[1] strAry 1 if(x == 0 && y == 0){
			break;
		} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
			break;
		} break; if(x > y){
		int chg = x;
		x = y;
		y = chg;
		} x > y x y {
		int chg = x;
		x = y;
		y = chg;
		} int chg = x; chg x x = y x y y = chg y chg System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y input =buf.readLine() input buf.readLine() buf.readLine buf String[] args args public class Main {
	public static void main(String[] args) throws Exception {
try {
	BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
	String input = buf.readLine();
	
	while(true){
		String[] strAry = input.split(" ");
	       int x = Integer.parseInt(strAry[0]);
	       int y = Integer.parseInt(strAry[1]);
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
		int chg = x;
		x = y;
		y = chg;
		}		
		System.out.println(x + " " + y);
		input =buf.readLine();
	}
} catch (Exception e) {
	// TODO: handle exception
}
		 }
    } public class Main {
	public static void main(String[] args) throws Exception {
try {
	BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
	String input = buf.readLine();
	
	while(true){
		String[] strAry = input.split(" ");
	       int x = Integer.parseInt(strAry[0]);
	       int y = Integer.parseInt(strAry[1]);
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
		int chg = x;
		x = y;
		y = chg;
		}		
		System.out.println(x + " " + y);
		input =buf.readLine();
	}
} catch (Exception e) {
	// TODO: handle exception
}
		 }
    } Main
import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main {
	public static void main(String[] args) throws Exception {
try {
	BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
	String input = buf.readLine();
	
	while(true){
		String[] strAry = input.split(" ");
	       int x = Integer.parseInt(strAry[0]);
	       int y = Integer.parseInt(strAry[1]);
		if(x == 0 && y == 0){
			break;
		}
		if(x > y){
		int chg = x;
		x = y;
		y = chg;
		}		
		System.out.println(x + " " + y);
		input =buf.readLine();
	}
} catch (Exception e) {
	// TODO: handle exception
}
		 }
    }