import java.io.*;
public class Main {
	public static void main(String[] args){
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try{
        	while(true) {
        		String line = reader.readLine();
        		String[] num = line.split(" ", -1);
        		int x = Integer.parseInt(num[0]);
        		int y = Integer.parseInt(num[1]);
        		if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		}
        	}
        } catch (IOException e) {
          System.out.println(e);
        } catch (NumberFormatException e) {
          System.out.println("error");
        }
    }
} import java.io.*; io.* java public class Main {
	public static void main(String[] args){
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try{
        	while(true) {
        		String line = reader.readLine();
        		String[] num = line.split(" ", -1);
        		int x = Integer.parseInt(num[0]);
        		int y = Integer.parseInt(num[1]);
        		if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		}
        	}
        } catch (IOException e) {
          System.out.println(e);
        } catch (NumberFormatException e) {
          System.out.println("error");
        }
    }
} Main public static void main(String[] args){
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try{
        	while(true) {
        		String line = reader.readLine();
        		String[] num = line.split(" ", -1);
        		int x = Integer.parseInt(num[0]);
        		int y = Integer.parseInt(num[1]);
        		if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		}
        	}
        } catch (IOException e) {
          System.out.println(e);
        } catch (NumberFormatException e) {
          System.out.println("error");
        }
    } main {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try{
        	while(true) {
        		String line = reader.readLine();
        		String[] num = line.split(" ", -1);
        		int x = Integer.parseInt(num[0]);
        		int y = Integer.parseInt(num[1]);
        		if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		}
        	}
        } catch (IOException e) {
          System.out.println(e);
        } catch (NumberFormatException e) {
          System.out.println("error");
        }
    } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) try{
        	while(true) {
        		String line = reader.readLine();
        		String[] num = line.split(" ", -1);
        		int x = Integer.parseInt(num[0]);
        		int y = Integer.parseInt(num[1]);
        		if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		}
        	}
        } catch (IOException e) {
          System.out.println(e);
        } catch (NumberFormatException e) {
          System.out.println("error");
        } catch (IOException e) {
          System.out.println(e);
        } IOException e {
          System.out.println(e);
        } System.out.println(e) System.out.println System.out System System.out e catch (NumberFormatException e) {
          System.out.println("error");
        } NumberFormatException e {
          System.out.println("error");
        } System.out.println("error") System.out.println System.out System System.out "error" {
        	while(true) {
        		String line = reader.readLine();
        		String[] num = line.split(" ", -1);
        		int x = Integer.parseInt(num[0]);
        		int y = Integer.parseInt(num[1]);
        		if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		}
        	}
        } while(true) {
        		String line = reader.readLine();
        		String[] num = line.split(" ", -1);
        		int x = Integer.parseInt(num[0]);
        		int y = Integer.parseInt(num[1]);
        		if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		}
        	} true {
        		String line = reader.readLine();
        		String[] num = line.split(" ", -1);
        		int x = Integer.parseInt(num[0]);
        		int y = Integer.parseInt(num[1]);
        		if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		}
        	} String line = reader.readLine(); line reader.readLine() reader.readLine reader String[] num = line.split(" ", -1); num line.split(" ", -1) line.split line " " -1 1 int x = Integer.parseInt(num[0]); x Integer.parseInt(num[0]) Integer.parseInt Integer num[0] num 0 int y = Integer.parseInt(num[1]); y Integer.parseInt(num[1]) Integer.parseInt Integer num[1] num 1 if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
        			break;
        		} break; {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		} if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			} x > y x y {
        				System.out.println(y + " " + x);
        			} System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x {
        				System.out.println(x + " " + y);
        			} 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){
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try{
        	while(true) {
        		String line = reader.readLine();
        		String[] num = line.split(" ", -1);
        		int x = Integer.parseInt(num[0]);
        		int y = Integer.parseInt(num[1]);
        		if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		}
        	}
        } catch (IOException e) {
          System.out.println(e);
        } catch (NumberFormatException e) {
          System.out.println("error");
        }
    }
} public class Main {
	public static void main(String[] args){
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try{
        	while(true) {
        		String line = reader.readLine();
        		String[] num = line.split(" ", -1);
        		int x = Integer.parseInt(num[0]);
        		int y = Integer.parseInt(num[1]);
        		if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		}
        	}
        } catch (IOException e) {
          System.out.println(e);
        } catch (NumberFormatException e) {
          System.out.println("error");
        }
    }
} Main
import java.io.*;
public class Main {
	public static void main(String[] args){
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try{
        	while(true) {
        		String line = reader.readLine();
        		String[] num = line.split(" ", -1);
        		int x = Integer.parseInt(num[0]);
        		int y = Integer.parseInt(num[1]);
        		if (x == 0 && y == 0) {
        			break;
        		} else {
        			if (x > y) {
        				System.out.println(y + " " + x);
        			} else {
        				System.out.println(x + " " + y);
        			}
        		}
        	}
        } catch (IOException e) {
          System.out.println(e);
        } catch (NumberFormatException e) {
          System.out.println("error");
        }
    }
}