import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] array = new String[2];
    int[] numbers = new int[2];
    String inputStr;
    StringBuilder sb = new StringBuilder();
    while(true) {
      inputStr = br.readLine();
      array = inputStr.split(" ");
      numbers[0] = Integer.parseInt(array[0]);
      numbers[1] = Integer.parseInt(array[1]);
      if (numbers[0] == 0 && numbers[1] == 0) {
        break;
      }
      else {
        if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        }
      }
    }
    sb.delete(sb.length() - 1, sb.length());
    System.out.println(sb);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] array = new String[2];
    int[] numbers = new int[2];
    String inputStr;
    StringBuilder sb = new StringBuilder();
    while(true) {
      inputStr = br.readLine();
      array = inputStr.split(" ");
      numbers[0] = Integer.parseInt(array[0]);
      numbers[1] = Integer.parseInt(array[1]);
      if (numbers[0] == 0 && numbers[1] == 0) {
        break;
      }
      else {
        if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        }
      }
    }
    sb.delete(sb.length() - 1, sb.length());
    System.out.println(sb);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] array = new String[2];
    int[] numbers = new int[2];
    String inputStr;
    StringBuilder sb = new StringBuilder();
    while(true) {
      inputStr = br.readLine();
      array = inputStr.split(" ");
      numbers[0] = Integer.parseInt(array[0]);
      numbers[1] = Integer.parseInt(array[1]);
      if (numbers[0] == 0 && numbers[1] == 0) {
        break;
      }
      else {
        if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        }
      }
    }
    sb.delete(sb.length() - 1, sb.length());
    System.out.println(sb);
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] array = new String[2];
    int[] numbers = new int[2];
    String inputStr;
    StringBuilder sb = new StringBuilder();
    while(true) {
      inputStr = br.readLine();
      array = inputStr.split(" ");
      numbers[0] = Integer.parseInt(array[0]);
      numbers[1] = Integer.parseInt(array[1]);
      if (numbers[0] == 0 && numbers[1] == 0) {
        break;
      }
      else {
        if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        }
      }
    }
    sb.delete(sb.length() - 1, sb.length());
    System.out.println(sb);
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] array = new String[2]; array new String[2] 2 int[] numbers = new int[2]; numbers new int[2] 2 String inputStr; inputStr StringBuilder sb = new StringBuilder(); sb new StringBuilder() while(true) {
      inputStr = br.readLine();
      array = inputStr.split(" ");
      numbers[0] = Integer.parseInt(array[0]);
      numbers[1] = Integer.parseInt(array[1]);
      if (numbers[0] == 0 && numbers[1] == 0) {
        break;
      }
      else {
        if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        }
      }
    } true {
      inputStr = br.readLine();
      array = inputStr.split(" ");
      numbers[0] = Integer.parseInt(array[0]);
      numbers[1] = Integer.parseInt(array[1]);
      if (numbers[0] == 0 && numbers[1] == 0) {
        break;
      }
      else {
        if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        }
      }
    } inputStr = br.readLine() inputStr br.readLine() br.readLine br array = inputStr.split(" ") array inputStr.split(" ") inputStr.split inputStr " " numbers[0] = Integer.parseInt(array[0]) numbers[0] numbers 0 Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 numbers[1] = Integer.parseInt(array[1]) numbers[1] numbers 1 Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 if (numbers[0] == 0 && numbers[1] == 0) {
        break;
      }
      else {
        if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        }
      } numbers[0] == 0 && numbers[1] == 0 numbers[0] == 0 numbers[0] numbers 0 0 numbers[1] == 0 numbers[1] numbers 1 0 {
        break;
      } break; {
        if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        }
      } if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        } numbers[0] < numbers[1] numbers[0] numbers 0 numbers[1] numbers 1 {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        } sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n") sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])) sb.append(Integer.toString(numbers[0])).append(" ").append sb.append(Integer.toString(numbers[0])).append(" ") sb.append(Integer.toString(numbers[0])).append sb.append(Integer.toString(numbers[0])) sb.append sb Integer.toString(numbers[0]) Integer.toString Integer numbers[0] numbers 0 " " Integer.toString(numbers[1]) Integer.toString Integer numbers[1] numbers 1 "\n" {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        } sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n") sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])) sb.append(Integer.toString(numbers[1])).append(" ").append sb.append(Integer.toString(numbers[1])).append(" ") sb.append(Integer.toString(numbers[1])).append sb.append(Integer.toString(numbers[1])) sb.append sb Integer.toString(numbers[1]) Integer.toString Integer numbers[1] numbers 1 " " Integer.toString(numbers[0]) Integer.toString Integer numbers[0] numbers 0 "\n" sb.delete(sb.length() - 1, sb.length()) sb.delete sb sb.length() - 1 sb.length() sb.length sb 1 sb.length() sb.length sb System.out.println(sb) System.out.println System.out System System.out sb String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] array = new String[2];
    int[] numbers = new int[2];
    String inputStr;
    StringBuilder sb = new StringBuilder();
    while(true) {
      inputStr = br.readLine();
      array = inputStr.split(" ");
      numbers[0] = Integer.parseInt(array[0]);
      numbers[1] = Integer.parseInt(array[1]);
      if (numbers[0] == 0 && numbers[1] == 0) {
        break;
      }
      else {
        if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        }
      }
    }
    sb.delete(sb.length() - 1, sb.length());
    System.out.println(sb);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] array = new String[2];
    int[] numbers = new int[2];
    String inputStr;
    StringBuilder sb = new StringBuilder();
    while(true) {
      inputStr = br.readLine();
      array = inputStr.split(" ");
      numbers[0] = Integer.parseInt(array[0]);
      numbers[1] = Integer.parseInt(array[1]);
      if (numbers[0] == 0 && numbers[1] == 0) {
        break;
      }
      else {
        if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        }
      }
    }
    sb.delete(sb.length() - 1, sb.length());
    System.out.println(sb);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] array = new String[2];
    int[] numbers = new int[2];
    String inputStr;
    StringBuilder sb = new StringBuilder();
    while(true) {
      inputStr = br.readLine();
      array = inputStr.split(" ");
      numbers[0] = Integer.parseInt(array[0]);
      numbers[1] = Integer.parseInt(array[1]);
      if (numbers[0] == 0 && numbers[1] == 0) {
        break;
      }
      else {
        if (numbers[0] < numbers[1]) {
          sb.append(Integer.toString(numbers[0])).append(" ").append(Integer.toString(numbers[1])).append("\n");
        }
        else {
          sb.append(Integer.toString(numbers[1])).append(" ").append(Integer.toString(numbers[0])).append("\n");
        }
      }
    }
    sb.delete(sb.length() - 1, sb.length());
    System.out.println(sb);
  }
}