import java.util.*;                                                                                  

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        for(int i = 0; i < 3000; i++) {
          String line = sc.nextLine();
          String[] l = line.split(" ");
          int x = Integer.parseInt(l[0]);
          int y = Integer.parseInt(l[1]);

          if(x == 0 && y == 0) {
            break;
          }   

          if(x <= y) {
            System.out.println(x + " " + y); 
          } else {
            System.out.println(y + " " + x); 
          }   
        }   
    }   
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        for(int i = 0; i < 3000; i++) {
          String line = sc.nextLine();
          String[] l = line.split(" ");
          int x = Integer.parseInt(l[0]);
          int y = Integer.parseInt(l[1]);

          if(x == 0 && y == 0) {
            break;
          }   

          if(x <= y) {
            System.out.println(x + " " + y); 
          } else {
            System.out.println(y + " " + x); 
          }   
        }   
    }   
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        for(int i = 0; i < 3000; i++) {
          String line = sc.nextLine();
          String[] l = line.split(" ");
          int x = Integer.parseInt(l[0]);
          int y = Integer.parseInt(l[1]);

          if(x == 0 && y == 0) {
            break;
          }   

          if(x <= y) {
            System.out.println(x + " " + y); 
          } else {
            System.out.println(y + " " + x); 
          }   
        }   
    } main {

        Scanner sc = new Scanner(System.in);

        for(int i = 0; i < 3000; i++) {
          String line = sc.nextLine();
          String[] l = line.split(" ");
          int x = Integer.parseInt(l[0]);
          int y = Integer.parseInt(l[1]);

          if(x == 0 && y == 0) {
            break;
          }   

          if(x <= y) {
            System.out.println(x + " " + y); 
          } else {
            System.out.println(y + " " + x); 
          }   
        }   
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for(int i = 0; i < 3000; i++) {
          String line = sc.nextLine();
          String[] l = line.split(" ");
          int x = Integer.parseInt(l[0]);
          int y = Integer.parseInt(l[1]);

          if(x == 0 && y == 0) {
            break;
          }   

          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 {
          String line = sc.nextLine();
          String[] l = line.split(" ");
          int x = Integer.parseInt(l[0]);
          int y = Integer.parseInt(l[1]);

          if(x == 0 && y == 0) {
            break;
          }   

          if(x <= y) {
            System.out.println(x + " " + y); 
          } else {
            System.out.println(y + " " + x); 
          }   
        } {
          String line = sc.nextLine();
          String[] l = line.split(" ");
          int x = Integer.parseInt(l[0]);
          int y = Integer.parseInt(l[1]);

          if(x == 0 && y == 0) {
            break;
          }   

          if(x <= y) {
            System.out.println(x + " " + y); 
          } else {
            System.out.println(y + " " + x); 
          }   
        } String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] l = line.split(" "); l line.split(" ") line.split line " " int x = Integer.parseInt(l[0]); x Integer.parseInt(l[0]) Integer.parseInt Integer l[0] l 0 int y = Integer.parseInt(l[1]); y Integer.parseInt(l[1]) Integer.parseInt Integer l[1] l 1 if(x == 0 && y == 0) {
            break;
          } 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); 
          } 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 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        for(int i = 0; i < 3000; i++) {
          String line = sc.nextLine();
          String[] l = line.split(" ");
          int x = Integer.parseInt(l[0]);
          int y = Integer.parseInt(l[1]);

          if(x == 0 && y == 0) {
            break;
          }   

          if(x <= y) {
            System.out.println(x + " " + y); 
          } else {
            System.out.println(y + " " + x); 
          }   
        }   
    }   
} public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        for(int i = 0; i < 3000; i++) {
          String line = sc.nextLine();
          String[] l = line.split(" ");
          int x = Integer.parseInt(l[0]);
          int y = Integer.parseInt(l[1]);

          if(x == 0 && y == 0) {
            break;
          }   

          if(x <= y) {
            System.out.println(x + " " + y); 
          } else {
            System.out.println(y + " " + x); 
          }   
        }   
    }   
} Main
import java.util.*;                                                                                  

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        for(int i = 0; i < 3000; i++) {
          String line = sc.nextLine();
          String[] l = line.split(" ");
          int x = Integer.parseInt(l[0]);
          int y = Integer.parseInt(l[1]);

          if(x == 0 && y == 0) {
            break;
          }   

          if(x <= y) {
            System.out.println(x + " " + y); 
          } else {
            System.out.println(y + " " + x); 
          }   
        }   
    }   
}