import java.util.Scanner;
import java.util.Arrays;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(true){
      String str = sc.nextLine();
      String[] str2 = str.split(" ");
      int[] x = new int[2];
      for (int i = 0; i < 2; i++){
        x[i] = Integer.parseInt(str2[i]);
      }
      if(x[0] == 0 && x[1] == 0){
        break;
      }
      Arrays.sort(x);
      System.out.println(x[0] + " " + x[1]);
    }
  }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(true){
      String str = sc.nextLine();
      String[] str2 = str.split(" ");
      int[] x = new int[2];
      for (int i = 0; i < 2; i++){
        x[i] = Integer.parseInt(str2[i]);
      }
      if(x[0] == 0 && x[1] == 0){
        break;
      }
      Arrays.sort(x);
      System.out.println(x[0] + " " + x[1]);
    }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(true){
      String str = sc.nextLine();
      String[] str2 = str.split(" ");
      int[] x = new int[2];
      for (int i = 0; i < 2; i++){
        x[i] = Integer.parseInt(str2[i]);
      }
      if(x[0] == 0 && x[1] == 0){
        break;
      }
      Arrays.sort(x);
      System.out.println(x[0] + " " + x[1]);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    while(true){
      String str = sc.nextLine();
      String[] str2 = str.split(" ");
      int[] x = new int[2];
      for (int i = 0; i < 2; i++){
        x[i] = Integer.parseInt(str2[i]);
      }
      if(x[0] == 0 && x[1] == 0){
        break;
      }
      Arrays.sort(x);
      System.out.println(x[0] + " " + x[1]);
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(true){
      String str = sc.nextLine();
      String[] str2 = str.split(" ");
      int[] x = new int[2];
      for (int i = 0; i < 2; i++){
        x[i] = Integer.parseInt(str2[i]);
      }
      if(x[0] == 0 && x[1] == 0){
        break;
      }
      Arrays.sort(x);
      System.out.println(x[0] + " " + x[1]);
    } true {
      String str = sc.nextLine();
      String[] str2 = str.split(" ");
      int[] x = new int[2];
      for (int i = 0; i < 2; i++){
        x[i] = Integer.parseInt(str2[i]);
      }
      if(x[0] == 0 && x[1] == 0){
        break;
      }
      Arrays.sort(x);
      System.out.println(x[0] + " " + x[1]);
    } String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc String[] str2 = str.split(" "); str2 str.split(" ") str.split str " " int[] x = new int[2]; x new int[2] 2 for (int i = 0; i < 2; i++){
        x[i] = Integer.parseInt(str2[i]);
      } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
        x[i] = Integer.parseInt(str2[i]);
      } {
        x[i] = Integer.parseInt(str2[i]);
      } x[i] = Integer.parseInt(str2[i]) x[i] x i Integer.parseInt(str2[i]) Integer.parseInt Integer str2[i] str2 i if(x[0] == 0 && x[1] == 0){
        break;
      } x[0] == 0 && x[1] == 0 x[0] == 0 x[0] x 0 0 x[1] == 0 x[1] x 1 0 {
        break;
      } break; Arrays.sort(x) Arrays.sort Arrays x System.out.println(x[0] + " " + x[1]) System.out.println System.out System System.out x[0] + " " + x[1] x[0] + " " + x[1] x[0] x 0 " " x[1] x 1 String[] args args
import java.util.Scanner;
import java.util.Arrays;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(true){
      String str = sc.nextLine();
      String[] str2 = str.split(" ");
      int[] x = new int[2];
      for (int i = 0; i < 2; i++){
        x[i] = Integer.parseInt(str2[i]);
      }
      if(x[0] == 0 && x[1] == 0){
        break;
      }
      Arrays.sort(x);
      System.out.println(x[0] + " " + x[1]);
    }
  }
}
