import java.util.Scanner;

public class Main {
	public static void main(String[] args){
	    Scanner std = new Scanner(System.in);
	    while(true){
	    	int x = Integer.parseInt(std.next());
	    	int y = Integer.parseInt(std.next());
	    	if(x!=0 || y!=0){
	    		if(x>y){int temp = x;x=y;y=temp;}
	    		System.out.println(x+" "+y);
	    	}else{
	    		break;
	    	}
	    }
	}} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
	    Scanner std = new Scanner(System.in);
	    while(true){
	    	int x = Integer.parseInt(std.next());
	    	int y = Integer.parseInt(std.next());
	    	if(x!=0 || y!=0){
	    		if(x>y){int temp = x;x=y;y=temp;}
	    		System.out.println(x+" "+y);
	    	}else{
	    		break;
	    	}
	    }
	}} Main public static void main(String[] args){
	    Scanner std = new Scanner(System.in);
	    while(true){
	    	int x = Integer.parseInt(std.next());
	    	int y = Integer.parseInt(std.next());
	    	if(x!=0 || y!=0){
	    		if(x>y){int temp = x;x=y;y=temp;}
	    		System.out.println(x+" "+y);
	    	}else{
	    		break;
	    	}
	    }
	} main {
	    Scanner std = new Scanner(System.in);
	    while(true){
	    	int x = Integer.parseInt(std.next());
	    	int y = Integer.parseInt(std.next());
	    	if(x!=0 || y!=0){
	    		if(x>y){int temp = x;x=y;y=temp;}
	    		System.out.println(x+" "+y);
	    	}else{
	    		break;
	    	}
	    }
	} Scanner std = new Scanner(System.in); std new Scanner(System.in) while(true){
	    	int x = Integer.parseInt(std.next());
	    	int y = Integer.parseInt(std.next());
	    	if(x!=0 || y!=0){
	    		if(x>y){int temp = x;x=y;y=temp;}
	    		System.out.println(x+" "+y);
	    	}else{
	    		break;
	    	}
	    } true {
	    	int x = Integer.parseInt(std.next());
	    	int y = Integer.parseInt(std.next());
	    	if(x!=0 || y!=0){
	    		if(x>y){int temp = x;x=y;y=temp;}
	    		System.out.println(x+" "+y);
	    	}else{
	    		break;
	    	}
	    } int x = Integer.parseInt(std.next()); x Integer.parseInt(std.next()) Integer.parseInt Integer std.next() std.next std int y = Integer.parseInt(std.next()); y Integer.parseInt(std.next()) Integer.parseInt Integer std.next() std.next std if(x!=0 || y!=0){
	    		if(x>y){int temp = x;x=y;y=temp;}
	    		System.out.println(x+" "+y);
	    	}else{
	    		break;
	    	} x!=0 || y!=0 x!=0 x 0 y!=0 y 0 {
	    		if(x>y){int temp = x;x=y;y=temp;}
	    		System.out.println(x+" "+y);
	    	} if(x>y){int temp = x;x=y;y=temp;} x>y x y {int temp = x;x=y;y=temp;} int temp = x; temp x x=y x y y=temp y temp System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y {
	    		break;
	    	} break; String[] args args public class Main {
	public static void main(String[] args){
	    Scanner std = new Scanner(System.in);
	    while(true){
	    	int x = Integer.parseInt(std.next());
	    	int y = Integer.parseInt(std.next());
	    	if(x!=0 || y!=0){
	    		if(x>y){int temp = x;x=y;y=temp;}
	    		System.out.println(x+" "+y);
	    	}else{
	    		break;
	    	}
	    }
	}} public class Main {
	public static void main(String[] args){
	    Scanner std = new Scanner(System.in);
	    while(true){
	    	int x = Integer.parseInt(std.next());
	    	int y = Integer.parseInt(std.next());
	    	if(x!=0 || y!=0){
	    		if(x>y){int temp = x;x=y;y=temp;}
	    		System.out.println(x+" "+y);
	    	}else{
	    		break;
	    	}
	    }
	}} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
	    Scanner std = new Scanner(System.in);
	    while(true){
	    	int x = Integer.parseInt(std.next());
	    	int y = Integer.parseInt(std.next());
	    	if(x!=0 || y!=0){
	    		if(x>y){int temp = x;x=y;y=temp;}
	    		System.out.println(x+" "+y);
	    	}else{
	    		break;
	    	}
	    }
	}}