import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main{
  public static void main(String[] args) throws Exception{
    int x,y,tmp;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    while (true){
      String[] line = br.readLine().split(" ");
      x = Integer.parseInt(line[0]);
      y = Integer.parseInt(line[1]);
      if(x==0 && x==y){
        break;
      }else if(x>y){
        tmp = x;
        x = y;
        y = tmp;
      }
      System.out.println(x+" "+y);
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io class Main{
  public static void main(String[] args) throws Exception{
    int x,y,tmp;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    while (true){
      String[] line = br.readLine().split(" ");
      x = Integer.parseInt(line[0]);
      y = Integer.parseInt(line[1]);
      if(x==0 && x==y){
        break;
      }else if(x>y){
        tmp = x;
        x = y;
        y = tmp;
      }
      System.out.println(x+" "+y);
    }
  }
} Main public static void main(String[] args) throws Exception{
    int x,y,tmp;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    while (true){
      String[] line = br.readLine().split(" ");
      x = Integer.parseInt(line[0]);
      y = Integer.parseInt(line[1]);
      if(x==0 && x==y){
        break;
      }else if(x>y){
        tmp = x;
        x = y;
        y = tmp;
      }
      System.out.println(x+" "+y);
    }
  } main {
    int x,y,tmp;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    while (true){
      String[] line = br.readLine().split(" ");
      x = Integer.parseInt(line[0]);
      y = Integer.parseInt(line[1]);
      if(x==0 && x==y){
        break;
      }else if(x>y){
        tmp = x;
        x = y;
        y = tmp;
      }
      System.out.println(x+" "+y);
    }
  } int x x y y tmp; tmp BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while (true){
      String[] line = br.readLine().split(" ");
      x = Integer.parseInt(line[0]);
      y = Integer.parseInt(line[1]);
      if(x==0 && x==y){
        break;
      }else if(x>y){
        tmp = x;
        x = y;
        y = tmp;
      }
      System.out.println(x+" "+y);
    } true {
      String[] line = br.readLine().split(" ");
      x = Integer.parseInt(line[0]);
      y = Integer.parseInt(line[1]);
      if(x==0 && x==y){
        break;
      }else if(x>y){
        tmp = x;
        x = y;
        y = tmp;
      }
      System.out.println(x+" "+y);
    } String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " x = Integer.parseInt(line[0]) x Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 y = Integer.parseInt(line[1]) y Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 if(x==0 && x==y){
        break;
      }else if(x>y){
        tmp = x;
        x = y;
        y = tmp;
      } x==0 && x==y x==0 x 0 x==y x y {
        break;
      } break; if(x>y){
        tmp = x;
        x = y;
        y = tmp;
      } x>y x y {
        tmp = x;
        x = y;
        y = tmp;
      } tmp = x tmp x x = y x y y = tmp y tmp System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y String[] args args
import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main{
  public static void main(String[] args) throws Exception{
    int x,y,tmp;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    while (true){
      String[] line = br.readLine().split(" ");
      x = Integer.parseInt(line[0]);
      y = Integer.parseInt(line[1]);
      if(x==0 && x==y){
        break;
      }else if(x>y){
        tmp = x;
        x = y;
        y = tmp;
      }
      System.out.println(x+" "+y);
    }
  }
}