import java.io.*;
 
class Main {
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();
    while(true){
      String datas = br.readLine();
      String[] data = datas.split(" ");
      int a = Integer.parseInt(data[0]);
      int b = Integer.parseInt(data[1]);
      if(a == 0 && b == 0)
    	  break;
      
      if(a > b){
    	  int tmp = a;
    	  a = b;
    	  b = tmp;
      }
      
      sb.append(a).append(" ").append(b).append("\n");
    }
    System.out.print(sb);
  }
} import java.io.*; io.* java class Main {
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();
    while(true){
      String datas = br.readLine();
      String[] data = datas.split(" ");
      int a = Integer.parseInt(data[0]);
      int b = Integer.parseInt(data[1]);
      if(a == 0 && b == 0)
    	  break;
      
      if(a > b){
    	  int tmp = a;
    	  a = b;
    	  b = tmp;
      }
      
      sb.append(a).append(" ").append(b).append("\n");
    }
    System.out.print(sb);
  }
} Main public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();
    while(true){
      String datas = br.readLine();
      String[] data = datas.split(" ");
      int a = Integer.parseInt(data[0]);
      int b = Integer.parseInt(data[1]);
      if(a == 0 && b == 0)
    	  break;
      
      if(a > b){
    	  int tmp = a;
    	  a = b;
    	  b = tmp;
      }
      
      sb.append(a).append(" ").append(b).append("\n");
    }
    System.out.print(sb);
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();
    while(true){
      String datas = br.readLine();
      String[] data = datas.split(" ");
      int a = Integer.parseInt(data[0]);
      int b = Integer.parseInt(data[1]);
      if(a == 0 && b == 0)
    	  break;
      
      if(a > b){
    	  int tmp = a;
    	  a = b;
    	  b = tmp;
      }
      
      sb.append(a).append(" ").append(b).append("\n");
    }
    System.out.print(sb);
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() while(true){
      String datas = br.readLine();
      String[] data = datas.split(" ");
      int a = Integer.parseInt(data[0]);
      int b = Integer.parseInt(data[1]);
      if(a == 0 && b == 0)
    	  break;
      
      if(a > b){
    	  int tmp = a;
    	  a = b;
    	  b = tmp;
      }
      
      sb.append(a).append(" ").append(b).append("\n");
    } true {
      String datas = br.readLine();
      String[] data = datas.split(" ");
      int a = Integer.parseInt(data[0]);
      int b = Integer.parseInt(data[1]);
      if(a == 0 && b == 0)
    	  break;
      
      if(a > b){
    	  int tmp = a;
    	  a = b;
    	  b = tmp;
      }
      
      sb.append(a).append(" ").append(b).append("\n");
    } String datas = br.readLine(); datas br.readLine() br.readLine br String[] data = datas.split(" "); data datas.split(" ") datas.split datas " " int a = Integer.parseInt(data[0]); a Integer.parseInt(data[0]) Integer.parseInt Integer data[0] data 0 int b = Integer.parseInt(data[1]); b Integer.parseInt(data[1]) Integer.parseInt Integer data[1] data 1 if(a == 0 && b == 0)
    	  break; a == 0 && b == 0 a == 0 a 0 b == 0 b 0 break; if(a > b){
    	  int tmp = a;
    	  a = b;
    	  b = tmp;
      } a > b a b {
    	  int tmp = a;
    	  a = b;
    	  b = tmp;
      } int tmp = a; tmp a a = b a b b = tmp b tmp sb.append(a).append(" ").append(b).append("\n") sb.append(a).append(" ").append(b).append sb.append(a).append(" ").append(b) sb.append(a).append(" ").append sb.append(a).append(" ") sb.append(a).append sb.append(a) sb.append sb a " " b "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args
import java.io.*;
 
class Main {
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();
    while(true){
      String datas = br.readLine();
      String[] data = datas.split(" ");
      int a = Integer.parseInt(data[0]);
      int b = Integer.parseInt(data[1]);
      if(a == 0 && b == 0)
    	  break;
      
      if(a > b){
    	  int tmp = a;
    	  a = b;
    	  b = tmp;
      }
      
      sb.append(a).append(" ").append(b).append("\n");
    }
    System.out.print(sb);
  }
}