import java.util.*;

class Main {

   public static void main(String[] args) throws Exception {
      Scanner sc = new Scanner(System.in);
      int x = sc.nextInt();
      int y = sc.nextInt();
      int work;
      while (x != 0 || y != 0) {
         if (x > y) {
            work = x;
            x = y;
            y = work;
         }
         System.out.printf("%d %d\n", x, y);
         x = sc.nextInt();
         y = sc.nextInt();
      }
   }
} import java.util.*; util.* java class Main {

   public static void main(String[] args) throws Exception {
      Scanner sc = new Scanner(System.in);
      int x = sc.nextInt();
      int y = sc.nextInt();
      int work;
      while (x != 0 || y != 0) {
         if (x > y) {
            work = x;
            x = y;
            y = work;
         }
         System.out.printf("%d %d\n", x, y);
         x = sc.nextInt();
         y = sc.nextInt();
      }
   }
} Main public static void main(String[] args) throws Exception {
      Scanner sc = new Scanner(System.in);
      int x = sc.nextInt();
      int y = sc.nextInt();
      int work;
      while (x != 0 || y != 0) {
         if (x > y) {
            work = x;
            x = y;
            y = work;
         }
         System.out.printf("%d %d\n", x, y);
         x = sc.nextInt();
         y = sc.nextInt();
      }
   } main {
      Scanner sc = new Scanner(System.in);
      int x = sc.nextInt();
      int y = sc.nextInt();
      int work;
      while (x != 0 || y != 0) {
         if (x > y) {
            work = x;
            x = y;
            y = work;
         }
         System.out.printf("%d %d\n", x, y);
         x = sc.nextInt();
         y = sc.nextInt();
      }
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc int work; work while (x != 0 || y != 0) {
         if (x > y) {
            work = x;
            x = y;
            y = work;
         }
         System.out.printf("%d %d\n", x, y);
         x = sc.nextInt();
         y = sc.nextInt();
      } x != 0 || y != 0 x != 0 x 0 y != 0 y 0 {
         if (x > y) {
            work = x;
            x = y;
            y = work;
         }
         System.out.printf("%d %d\n", x, y);
         x = sc.nextInt();
         y = sc.nextInt();
      } if (x > y) {
            work = x;
            x = y;
            y = work;
         } x > y x y {
            work = x;
            x = y;
            y = work;
         } work = x work x x = y x y y = work y work System.out.printf("%d %d\n", x, y) System.out.printf System.out System System.out "%d %d\n" x y x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc String[] args args
import java.util.*;

class Main {

   public static void main(String[] args) throws Exception {
      Scanner sc = new Scanner(System.in);
      int x = sc.nextInt();
      int y = sc.nextInt();
      int work;
      while (x != 0 || y != 0) {
         if (x > y) {
            work = x;
            x = y;
            y = work;
         }
         System.out.printf("%d %d\n", x, y);
         x = sc.nextInt();
         y = sc.nextInt();
      }
   }
}