import java.util.Scanner;
class Main{
    public static void main(String[] args){
	final Scanner sc=new Scanner(System.in);
	int a=sc.nextInt();
	int b=sc.nextInt();
	while(true){
	    if(a==0 && b==0) break;
	    if(a<b) System.out.println(a+" "+b);
	    else System.out.println(b+" "+a);
	    a=sc.nextInt();
	    b=sc.nextInt();
	}
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
	final Scanner sc=new Scanner(System.in);
	int a=sc.nextInt();
	int b=sc.nextInt();
	while(true){
	    if(a==0 && b==0) break;
	    if(a<b) System.out.println(a+" "+b);
	    else System.out.println(b+" "+a);
	    a=sc.nextInt();
	    b=sc.nextInt();
	}
    }
} Main public static void main(String[] args){
	final Scanner sc=new Scanner(System.in);
	int a=sc.nextInt();
	int b=sc.nextInt();
	while(true){
	    if(a==0 && b==0) break;
	    if(a<b) System.out.println(a+" "+b);
	    else System.out.println(b+" "+a);
	    a=sc.nextInt();
	    b=sc.nextInt();
	}
    } main {
	final Scanner sc=new Scanner(System.in);
	int a=sc.nextInt();
	int b=sc.nextInt();
	while(true){
	    if(a==0 && b==0) break;
	    if(a<b) System.out.println(a+" "+b);
	    else System.out.println(b+" "+a);
	    a=sc.nextInt();
	    b=sc.nextInt();
	}
    } final Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc int b=sc.nextInt(); b sc.nextInt() sc.nextInt sc while(true){
	    if(a==0 && b==0) break;
	    if(a<b) System.out.println(a+" "+b);
	    else System.out.println(b+" "+a);
	    a=sc.nextInt();
	    b=sc.nextInt();
	} true {
	    if(a==0 && b==0) break;
	    if(a<b) System.out.println(a+" "+b);
	    else System.out.println(b+" "+a);
	    a=sc.nextInt();
	    b=sc.nextInt();
	} if(a==0 && b==0) break; a==0 && b==0 a==0 a 0 b==0 b 0 break; if(a<b) System.out.println(a+" "+b);
	    else System.out.println(b+" "+a); a<b a b System.out.println(a+" "+b) System.out.println System.out System System.out a+" "+b a+" "+b a " " b System.out.println(b+" "+a) System.out.println System.out System System.out b+" "+a b+" "+a b " " a a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc String[] args args
import java.util.Scanner;
class Main{
    public static void main(String[] args){
	final Scanner sc=new Scanner(System.in);
	int a=sc.nextInt();
	int b=sc.nextInt();
	while(true){
	    if(a==0 && b==0) break;
	    if(a<b) System.out.println(a+" "+b);
	    else System.out.println(b+" "+a);
	    a=sc.nextInt();
	    b=sc.nextInt();
	}
    }
}