import java.util.Scanner;

public class Main {

  private static int x;
  private static int y;

  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    for (int i = 0; i < 3000 ; i++ ) {
      x = stdIn.nextInt();
      y = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      }
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {

  private static int x;
  private static int y;

  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    for (int i = 0; i < 3000 ; i++ ) {
      x = stdIn.nextInt();
      y = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      }
    }
  }
} Main private static int x; x private static int y; y public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    for (int i = 0; i < 3000 ; i++ ) {
      x = stdIn.nextInt();
      y = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      }
    }
  } main {
    Scanner stdIn = new Scanner(System.in);
    for (int i = 0; i < 3000 ; i++ ) {
      x = stdIn.nextInt();
      y = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      }
    }
  } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) for (int i = 0; i < 3000 ; i++ ) {
      x = stdIn.nextInt();
      y = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      }
    } int i = 0; int i = 0; i 0 i < 3000 i 3000 i++ i++ i {
      x = stdIn.nextInt();
      y = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      }
    } {
      x = stdIn.nextInt();
      y = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      }
    } x = stdIn.nextInt() x stdIn.nextInt() stdIn.nextInt stdIn y = stdIn.nextInt() y stdIn.nextInt() stdIn.nextInt stdIn if (x == 0 && y == 0) {
        break;
      } else {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
        break;
      } break; {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      } if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        } x <= y x y {
          System.out.println(x + " " + y);
        } System.out.println(x + " " + y) System.out.println System.out System System.out 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 String[] args args public class Main {

  private static int x;
  private static int y;

  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    for (int i = 0; i < 3000 ; i++ ) {
      x = stdIn.nextInt();
      y = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      }
    }
  }
} public class Main {

  private static int x;
  private static int y;

  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    for (int i = 0; i < 3000 ; i++ ) {
      x = stdIn.nextInt();
      y = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      }
    }
  }
} Main
import java.util.Scanner;

public class Main {

  private static int x;
  private static int y;

  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    for (int i = 0; i < 3000 ; i++ ) {
      x = stdIn.nextInt();
      y = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else {
        if (x <= y) {
          System.out.println(x + " " + y);
        } else {
          System.out.println(y + " " + x);
        }
      }
    }
  }
}