import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    

	String inputnum;
	while(true){
		inputnum = sc.nextLine();
		if(inputnum.equals("0 0")){
			break;
		}
	System.out.println(select(inputnum));
	}

  }
  public static String select(String inputnum){
	String space = " ";
	String nums[] = inputnum.split(space);
        int x = Integer.parseInt(nums[0]);
        int y = Integer.parseInt(nums[1]);

        if(x > y){
		int temp = x;
		x = y;
		y = temp;
		return(x + space + y);
	}
	return(x + space + y);
  }


} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    

	String inputnum;
	while(true){
		inputnum = sc.nextLine();
		if(inputnum.equals("0 0")){
			break;
		}
	System.out.println(select(inputnum));
	}

  }
  public static String select(String inputnum){
	String space = " ";
	String nums[] = inputnum.split(space);
        int x = Integer.parseInt(nums[0]);
        int y = Integer.parseInt(nums[1]);

        if(x > y){
		int temp = x;
		x = y;
		y = temp;
		return(x + space + y);
	}
	return(x + space + y);
  }


} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    

	String inputnum;
	while(true){
		inputnum = sc.nextLine();
		if(inputnum.equals("0 0")){
			break;
		}
	System.out.println(select(inputnum));
	}

  } main {
    Scanner sc = new Scanner(System.in);
    

	String inputnum;
	while(true){
		inputnum = sc.nextLine();
		if(inputnum.equals("0 0")){
			break;
		}
	System.out.println(select(inputnum));
	}

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String inputnum; inputnum while(true){
		inputnum = sc.nextLine();
		if(inputnum.equals("0 0")){
			break;
		}
	System.out.println(select(inputnum));
	} true {
		inputnum = sc.nextLine();
		if(inputnum.equals("0 0")){
			break;
		}
	System.out.println(select(inputnum));
	} inputnum = sc.nextLine() inputnum sc.nextLine() sc.nextLine sc if(inputnum.equals("0 0")){
			break;
		} inputnum.equals("0 0") inputnum.equals inputnum "0 0" {
			break;
		} break; System.out.println(select(inputnum)) System.out.println System.out System System.out select(inputnum) select inputnum String[] args args public static String select(String inputnum){
	String space = " ";
	String nums[] = inputnum.split(space);
        int x = Integer.parseInt(nums[0]);
        int y = Integer.parseInt(nums[1]);

        if(x > y){
		int temp = x;
		x = y;
		y = temp;
		return(x + space + y);
	}
	return(x + space + y);
  } select {
	String space = " ";
	String nums[] = inputnum.split(space);
        int x = Integer.parseInt(nums[0]);
        int y = Integer.parseInt(nums[1]);

        if(x > y){
		int temp = x;
		x = y;
		y = temp;
		return(x + space + y);
	}
	return(x + space + y);
  } String space = " "; space " " String nums[] = inputnum.split(space); nums inputnum.split(space) inputnum.split inputnum space int x = Integer.parseInt(nums[0]); x Integer.parseInt(nums[0]) Integer.parseInt Integer nums[0] nums 0 int y = Integer.parseInt(nums[1]); y Integer.parseInt(nums[1]) Integer.parseInt Integer nums[1] nums 1 if(x > y){
		int temp = x;
		x = y;
		y = temp;
		return(x + space + y);
	} x > y x y {
		int temp = x;
		x = y;
		y = temp;
		return(x + space + y);
	} int temp = x; temp x x = y x y y = temp y temp return(x + space + y); (x + space + y) x + space + y x space y return(x + space + y); (x + space + y) x + space + y x space y String inputnum inputnum public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    

	String inputnum;
	while(true){
		inputnum = sc.nextLine();
		if(inputnum.equals("0 0")){
			break;
		}
	System.out.println(select(inputnum));
	}

  }
  public static String select(String inputnum){
	String space = " ";
	String nums[] = inputnum.split(space);
        int x = Integer.parseInt(nums[0]);
        int y = Integer.parseInt(nums[1]);

        if(x > y){
		int temp = x;
		x = y;
		y = temp;
		return(x + space + y);
	}
	return(x + space + y);
  }


} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    

	String inputnum;
	while(true){
		inputnum = sc.nextLine();
		if(inputnum.equals("0 0")){
			break;
		}
	System.out.println(select(inputnum));
	}

  }
  public static String select(String inputnum){
	String space = " ";
	String nums[] = inputnum.split(space);
        int x = Integer.parseInt(nums[0]);
        int y = Integer.parseInt(nums[1]);

        if(x > y){
		int temp = x;
		x = y;
		y = temp;
		return(x + space + y);
	}
	return(x + space + y);
  }


} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    

	String inputnum;
	while(true){
		inputnum = sc.nextLine();
		if(inputnum.equals("0 0")){
			break;
		}
	System.out.println(select(inputnum));
	}

  }
  public static String select(String inputnum){
	String space = " ";
	String nums[] = inputnum.split(space);
        int x = Integer.parseInt(nums[0]);
        int y = Integer.parseInt(nums[1]);

        if(x > y){
		int temp = x;
		x = y;
		y = temp;
		return(x + space + y);
	}
	return(x + space + y);
  }


}