import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        for(int i=0;i<=3000;i++){
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a<b){
                System.out.printf("%d %d\n",a,b);
            }else if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            }
        }
    }
}
 import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        for(int i=0;i<=3000;i++){
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a<b){
                System.out.printf("%d %d\n",a,b);
            }else if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            }
        }
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        for(int i=0;i<=3000;i++){
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a<b){
                System.out.printf("%d %d\n",a,b);
            }else if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            }
        }
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        for(int i=0;i<=3000;i++){
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a<b){
                System.out.printf("%d %d\n",a,b);
            }else if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for(int i=0;i<=3000;i++){
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a<b){
                System.out.printf("%d %d\n",a,b);
            }else if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            }
        } int i=0; int i=0; i 0 i<=3000 i 3000 i++ i++ i {
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a<b){
                System.out.printf("%d %d\n",a,b);
            }else if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            }
        } {
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a<b){
                System.out.printf("%d %d\n",a,b);
            }else if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            }
        } int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc int b=sc.nextInt(); b sc.nextInt() sc.nextInt sc if(a<b){
                System.out.printf("%d %d\n",a,b);
            }else if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            } a<b a b {
                System.out.printf("%d %d\n",a,b);
            } System.out.printf("%d %d\n",a,b) System.out.printf System.out System System.out "%d %d\n" a b if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            } a>b a b {
                System.out.printf("%d %d\n",b,a);
            } System.out.printf("%d %d\n",b,a) System.out.printf System.out System System.out "%d %d\n" b a if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            } a==b && a!=0 a==b a b a!=0 a 0 {
                System.out.printf("%d %d\n",a,b);
            } System.out.printf("%d %d\n",a,b) System.out.printf System.out System System.out "%d %d\n" a b {
                break;
            } break; String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        for(int i=0;i<=3000;i++){
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a<b){
                System.out.printf("%d %d\n",a,b);
            }else if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            }
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        for(int i=0;i<=3000;i++){
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a<b){
                System.out.printf("%d %d\n",a,b);
            }else if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        for(int i=0;i<=3000;i++){
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a<b){
                System.out.printf("%d %d\n",a,b);
            }else if(a>b){
                System.out.printf("%d %d\n",b,a);
            }else if(a==b && a!=0){
                System.out.printf("%d %d\n",a,b);
            }else{
                break;
            }
        }
    }
}

