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

public class Main {
	public static void main(String[] args){
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder=new StringBuilder();
		String[] str=new String[2];
		int x, y, z;

		try{
			while(true){
				str=reader.readLine().split(" ");
				x=Integer.parseInt(str[0]);
				y=Integer.parseInt(str[1]);
				if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				}
			}
		}catch(IOException e){
			e.printStackTrace();
		}

		System.out.print(builder);
	}
} 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){
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder=new StringBuilder();
		String[] str=new String[2];
		int x, y, z;

		try{
			while(true){
				str=reader.readLine().split(" ");
				x=Integer.parseInt(str[0]);
				y=Integer.parseInt(str[1]);
				if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				}
			}
		}catch(IOException e){
			e.printStackTrace();
		}

		System.out.print(builder);
	}
} Main public static void main(String[] args){
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder=new StringBuilder();
		String[] str=new String[2];
		int x, y, z;

		try{
			while(true){
				str=reader.readLine().split(" ");
				x=Integer.parseInt(str[0]);
				y=Integer.parseInt(str[1]);
				if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				}
			}
		}catch(IOException e){
			e.printStackTrace();
		}

		System.out.print(builder);
	} main {
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder=new StringBuilder();
		String[] str=new String[2];
		int x, y, z;

		try{
			while(true){
				str=reader.readLine().split(" ");
				x=Integer.parseInt(str[0]);
				y=Integer.parseInt(str[1]);
				if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				}
			}
		}catch(IOException e){
			e.printStackTrace();
		}

		System.out.print(builder);
	} BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) StringBuilder builder=new StringBuilder(); builder new StringBuilder() String[] str=new String[2]; str new String[2] 2 int x x y y z; z try{
			while(true){
				str=reader.readLine().split(" ");
				x=Integer.parseInt(str[0]);
				y=Integer.parseInt(str[1]);
				if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				}
			}
		}catch(IOException e){
			e.printStackTrace();
		} catch(IOException e){
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			while(true){
				str=reader.readLine().split(" ");
				x=Integer.parseInt(str[0]);
				y=Integer.parseInt(str[1]);
				if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				}
			}
		} while(true){
				str=reader.readLine().split(" ");
				x=Integer.parseInt(str[0]);
				y=Integer.parseInt(str[1]);
				if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				}
			} true {
				str=reader.readLine().split(" ");
				x=Integer.parseInt(str[0]);
				y=Integer.parseInt(str[1]);
				if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				}
			} str=reader.readLine().split(" ") str reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " x=Integer.parseInt(str[0]) x Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 y=Integer.parseInt(str[1]) y Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				} x==0&&y==0 x==0 x 0 y==0 y 0 break; {
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				} if(x>y){
						z=x;
						x=y;
						y=z;
					} x>y x y {
						z=x;
						x=y;
						y=z;
					} z=x z x x=y x y y=z y z builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n") builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)) builder.append(Integer.toString(x)).append(" ").append builder.append(Integer.toString(x)).append(" ") builder.append(Integer.toString(x)).append builder.append(Integer.toString(x)) builder.append builder Integer.toString(x) Integer.toString Integer x " " Integer.toString(y) Integer.toString Integer y "\n" System.out.print(builder) System.out.print System.out System System.out builder String[] args args public class Main {
	public static void main(String[] args){
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder=new StringBuilder();
		String[] str=new String[2];
		int x, y, z;

		try{
			while(true){
				str=reader.readLine().split(" ");
				x=Integer.parseInt(str[0]);
				y=Integer.parseInt(str[1]);
				if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				}
			}
		}catch(IOException e){
			e.printStackTrace();
		}

		System.out.print(builder);
	}
} public class Main {
	public static void main(String[] args){
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder=new StringBuilder();
		String[] str=new String[2];
		int x, y, z;

		try{
			while(true){
				str=reader.readLine().split(" ");
				x=Integer.parseInt(str[0]);
				y=Integer.parseInt(str[1]);
				if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				}
			}
		}catch(IOException e){
			e.printStackTrace();
		}

		System.out.print(builder);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args){
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder=new StringBuilder();
		String[] str=new String[2];
		int x, y, z;

		try{
			while(true){
				str=reader.readLine().split(" ");
				x=Integer.parseInt(str[0]);
				y=Integer.parseInt(str[1]);
				if(x==0&&y==0)break;
				else{
					if(x>y){
						z=x;
						x=y;
						y=z;
					}
					builder.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
				}
			}
		}catch(IOException e){
			e.printStackTrace();
		}

		System.out.print(builder);
	}
}