import java.io.*;
import java.util.Scanner;

class Main {
   public static void main(String[] args) {
       Scanner in = new Scanner(System.in);
       int    x = in.nextInt();
       int    y = in.nextInt();
       int    w;
       
       while(x!=0 || y!=0){
          if(x>y){
             w = x;
             x = y;
             y = w;
          }
        System.out.println(x + " " + y);

        x = in.nextInt();
        y = in.nextInt();
}  

}
} import java.io.*; io.* java import java.util.Scanner; Scanner java.util class Main {
   public static void main(String[] args) {
       Scanner in = new Scanner(System.in);
       int    x = in.nextInt();
       int    y = in.nextInt();
       int    w;
       
       while(x!=0 || y!=0){
          if(x>y){
             w = x;
             x = y;
             y = w;
          }
        System.out.println(x + " " + y);

        x = in.nextInt();
        y = in.nextInt();
}  

}
} Main public static void main(String[] args) {
       Scanner in = new Scanner(System.in);
       int    x = in.nextInt();
       int    y = in.nextInt();
       int    w;
       
       while(x!=0 || y!=0){
          if(x>y){
             w = x;
             x = y;
             y = w;
          }
        System.out.println(x + " " + y);

        x = in.nextInt();
        y = in.nextInt();
}  

} main {
       Scanner in = new Scanner(System.in);
       int    x = in.nextInt();
       int    y = in.nextInt();
       int    w;
       
       while(x!=0 || y!=0){
          if(x>y){
             w = x;
             x = y;
             y = w;
          }
        System.out.println(x + " " + y);

        x = in.nextInt();
        y = in.nextInt();
}  

} Scanner in = new Scanner(System.in); in new Scanner(System.in) int    x = in.nextInt(); x in.nextInt() in.nextInt in int    y = in.nextInt(); y in.nextInt() in.nextInt in int    w; w while(x!=0 || y!=0){
          if(x>y){
             w = x;
             x = y;
             y = w;
          }
        System.out.println(x + " " + y);

        x = in.nextInt();
        y = in.nextInt();
} x!=0 || y!=0 x!=0 x 0 y!=0 y 0 {
          if(x>y){
             w = x;
             x = y;
             y = w;
          }
        System.out.println(x + " " + y);

        x = in.nextInt();
        y = in.nextInt();
} if(x>y){
             w = x;
             x = y;
             y = w;
          } x>y x y {
             w = x;
             x = y;
             y = w;
          } w = x w x x = y x y y = w y w System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y x = in.nextInt() x in.nextInt() in.nextInt in y = in.nextInt() y in.nextInt() in.nextInt in String[] args args
import java.io.*;
import java.util.Scanner;

class Main {
   public static void main(String[] args) {
       Scanner in = new Scanner(System.in);
       int    x = in.nextInt();
       int    y = in.nextInt();
       int    w;
       
       while(x!=0 || y!=0){
          if(x>y){
             w = x;
             x = y;
             y = w;
          }
        System.out.println(x + " " + y);

        x = in.nextInt();
        y = in.nextInt();
}  

}
}