import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner stdin = new Scanner(System.in);
    while (true) {
      int x = stdin.nextInt();
      int y = stdin.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else if (x > y) {
        System.out.printf("%d %d%n", y, x);
      } else {
        System.out.printf("%d %d%n", x, y);
      }
    }
  }

} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    Scanner stdin = new Scanner(System.in);
    while (true) {
      int x = stdin.nextInt();
      int y = stdin.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else if (x > y) {
        System.out.printf("%d %d%n", y, x);
      } else {
        System.out.printf("%d %d%n", x, y);
      }
    }
  }

} Main public static void main(String[] args) {
    Scanner stdin = new Scanner(System.in);
    while (true) {
      int x = stdin.nextInt();
      int y = stdin.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else if (x > y) {
        System.out.printf("%d %d%n", y, x);
      } else {
        System.out.printf("%d %d%n", x, y);
      }
    }
  } main {
    Scanner stdin = new Scanner(System.in);
    while (true) {
      int x = stdin.nextInt();
      int y = stdin.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else if (x > y) {
        System.out.printf("%d %d%n", y, x);
      } else {
        System.out.printf("%d %d%n", x, y);
      }
    }
  } Scanner stdin = new Scanner(System.in); stdin new Scanner(System.in) while (true) {
      int x = stdin.nextInt();
      int y = stdin.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else if (x > y) {
        System.out.printf("%d %d%n", y, x);
      } else {
        System.out.printf("%d %d%n", x, y);
      }
    } true {
      int x = stdin.nextInt();
      int y = stdin.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else if (x > y) {
        System.out.printf("%d %d%n", y, x);
      } else {
        System.out.printf("%d %d%n", x, y);
      }
    } int x = stdin.nextInt(); x stdin.nextInt() stdin.nextInt stdin int y = stdin.nextInt(); y stdin.nextInt() stdin.nextInt stdin if (x == 0 && y == 0) {
        break;
      } else if (x > y) {
        System.out.printf("%d %d%n", y, x);
      } else {
        System.out.printf("%d %d%n", x, y);
      } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
        break;
      } break; if (x > y) {
        System.out.printf("%d %d%n", y, x);
      } else {
        System.out.printf("%d %d%n", x, y);
      } x > y x y {
        System.out.printf("%d %d%n", y, x);
      } System.out.printf("%d %d%n", y, x) System.out.printf System.out System System.out "%d %d%n" y x {
        System.out.printf("%d %d%n", x, y);
      } System.out.printf("%d %d%n", x, y) System.out.printf System.out System System.out "%d %d%n" x y String[] args args public class Main {

  public static void main(String[] args) {
    Scanner stdin = new Scanner(System.in);
    while (true) {
      int x = stdin.nextInt();
      int y = stdin.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else if (x > y) {
        System.out.printf("%d %d%n", y, x);
      } else {
        System.out.printf("%d %d%n", x, y);
      }
    }
  }

} public class Main {

  public static void main(String[] args) {
    Scanner stdin = new Scanner(System.in);
    while (true) {
      int x = stdin.nextInt();
      int y = stdin.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else if (x > y) {
        System.out.printf("%d %d%n", y, x);
      } else {
        System.out.printf("%d %d%n", x, y);
      }
    }
  }

} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner stdin = new Scanner(System.in);
    while (true) {
      int x = stdin.nextInt();
      int y = stdin.nextInt();
      if (x == 0 && y == 0) {
        break;
      } else if (x > y) {
        System.out.printf("%d %d%n", y, x);
      } else {
        System.out.printf("%d %d%n", x, y);
      }
    }
  }

}