import java.io.*;
public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		while(true){
			String str = in.readLine();
      String[] words = str.split("\\s");
			int[] data = new int[words.length];
      for(int i=0; i < words.length; i++){
        data[i] = Integer.parseInt(words[i]);
      }
			int x = data[0];
			int y = data[1];
			if( x == 0 && y == 0){
				break;
			}else if( x < y ){
				out.append(x).append(" ").append(y).append("\n");
			}else {
				out.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(out);
	}
} import java.io.*; io.* java public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		while(true){
			String str = in.readLine();
      String[] words = str.split("\\s");
			int[] data = new int[words.length];
      for(int i=0; i < words.length; i++){
        data[i] = Integer.parseInt(words[i]);
      }
			int x = data[0];
			int y = data[1];
			if( x == 0 && y == 0){
				break;
			}else if( x < y ){
				out.append(x).append(" ").append(y).append("\n");
			}else {
				out.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(out);
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		while(true){
			String str = in.readLine();
      String[] words = str.split("\\s");
			int[] data = new int[words.length];
      for(int i=0; i < words.length; i++){
        data[i] = Integer.parseInt(words[i]);
      }
			int x = data[0];
			int y = data[1];
			if( x == 0 && y == 0){
				break;
			}else if( x < y ){
				out.append(x).append(" ").append(y).append("\n");
			}else {
				out.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(out);
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		while(true){
			String str = in.readLine();
      String[] words = str.split("\\s");
			int[] data = new int[words.length];
      for(int i=0; i < words.length; i++){
        data[i] = Integer.parseInt(words[i]);
      }
			int x = data[0];
			int y = data[1];
			if( x == 0 && y == 0){
				break;
			}else if( x < y ){
				out.append(x).append(" ").append(y).append("\n");
			}else {
				out.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(out);
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) StringBuilder out = new StringBuilder(); out new StringBuilder() while(true){
			String str = in.readLine();
      String[] words = str.split("\\s");
			int[] data = new int[words.length];
      for(int i=0; i < words.length; i++){
        data[i] = Integer.parseInt(words[i]);
      }
			int x = data[0];
			int y = data[1];
			if( x == 0 && y == 0){
				break;
			}else if( x < y ){
				out.append(x).append(" ").append(y).append("\n");
			}else {
				out.append(y).append(" ").append(x).append("\n");
			}
		} true {
			String str = in.readLine();
      String[] words = str.split("\\s");
			int[] data = new int[words.length];
      for(int i=0; i < words.length; i++){
        data[i] = Integer.parseInt(words[i]);
      }
			int x = data[0];
			int y = data[1];
			if( x == 0 && y == 0){
				break;
			}else if( x < y ){
				out.append(x).append(" ").append(y).append("\n");
			}else {
				out.append(y).append(" ").append(x).append("\n");
			}
		} String str = in.readLine(); str in.readLine() in.readLine in String[] words = str.split("\\s"); words str.split("\\s") str.split str "\\s" int[] data = new int[words.length]; data new int[words.length] words.length words words.length for(int i=0; i < words.length; i++){
        data[i] = Integer.parseInt(words[i]);
      } int i=0; int i=0; i 0 i < words.length i words.length words words.length i++ i++ i {
        data[i] = Integer.parseInt(words[i]);
      } {
        data[i] = Integer.parseInt(words[i]);
      } data[i] = Integer.parseInt(words[i]) data[i] data i Integer.parseInt(words[i]) Integer.parseInt Integer words[i] words i int x = data[0]; x data[0] data 0 int y = data[1]; y data[1] data 1 if( x == 0 && y == 0){
				break;
			}else if( x < y ){
				out.append(x).append(" ").append(y).append("\n");
			}else {
				out.append(y).append(" ").append(x).append("\n");
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				break;
			} break; if( x < y ){
				out.append(x).append(" ").append(y).append("\n");
			}else {
				out.append(y).append(" ").append(x).append("\n");
			} x < y x y {
				out.append(x).append(" ").append(y).append("\n");
			} out.append(x).append(" ").append(y).append("\n") out.append(x).append(" ").append(y).append out.append(x).append(" ").append(y) out.append(x).append(" ").append out.append(x).append(" ") out.append(x).append out.append(x) out.append out x " " y "\n" {
				out.append(y).append(" ").append(x).append("\n");
			} out.append(y).append(" ").append(x).append("\n") out.append(y).append(" ").append(x).append out.append(y).append(" ").append(x) out.append(y).append(" ").append out.append(y).append(" ") out.append(y).append out.append(y) out.append out y " " x "\n" System.out.print(out) System.out.print System.out System System.out out String[] args args public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		while(true){
			String str = in.readLine();
      String[] words = str.split("\\s");
			int[] data = new int[words.length];
      for(int i=0; i < words.length; i++){
        data[i] = Integer.parseInt(words[i]);
      }
			int x = data[0];
			int y = data[1];
			if( x == 0 && y == 0){
				break;
			}else if( x < y ){
				out.append(x).append(" ").append(y).append("\n");
			}else {
				out.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(out);
	}
} public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		while(true){
			String str = in.readLine();
      String[] words = str.split("\\s");
			int[] data = new int[words.length];
      for(int i=0; i < words.length; i++){
        data[i] = Integer.parseInt(words[i]);
      }
			int x = data[0];
			int y = data[1];
			if( x == 0 && y == 0){
				break;
			}else if( x < y ){
				out.append(x).append(" ").append(y).append("\n");
			}else {
				out.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(out);
	}
} Main
import java.io.*;
public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		while(true){
			String str = in.readLine();
      String[] words = str.split("\\s");
			int[] data = new int[words.length];
      for(int i=0; i < words.length; i++){
        data[i] = Integer.parseInt(words[i]);
      }
			int x = data[0];
			int y = data[1];
			if( x == 0 && y == 0){
				break;
			}else if( x < y ){
				out.append(x).append(" ").append(y).append("\n");
			}else {
				out.append(y).append(" ").append(x).append("\n");
			}
		}
		System.out.print(out);
	}
}