import static java.lang.System.out;
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNext()) {
            List<Integer> list = new ArrayList<>();
            list.add(scan.nextInt());
            list.add(scan.nextInt());

            if (list.get(0).equals(0) && list.get(1).equals(0)) {      
                break;
            }

            if (list.get(0) > list.get(1)) {
                int tmp = list.get(0);
                list.set(0, list.get(1));
                list.set(1, tmp);
            }

            out.printf("%d %d%n", list.get(0), list.get(1));
        }
    }
} import static java.lang.System.out; import static java.lang.System.out; import static java.lang.System.out; import java.util.Scanner; Scanner java.util import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNext()) {
            List<Integer> list = new ArrayList<>();
            list.add(scan.nextInt());
            list.add(scan.nextInt());

            if (list.get(0).equals(0) && list.get(1).equals(0)) {      
                break;
            }

            if (list.get(0) > list.get(1)) {
                int tmp = list.get(0);
                list.set(0, list.get(1));
                list.set(1, tmp);
            }

            out.printf("%d %d%n", list.get(0), list.get(1));
        }
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNext()) {
            List<Integer> list = new ArrayList<>();
            list.add(scan.nextInt());
            list.add(scan.nextInt());

            if (list.get(0).equals(0) && list.get(1).equals(0)) {      
                break;
            }

            if (list.get(0) > list.get(1)) {
                int tmp = list.get(0);
                list.set(0, list.get(1));
                list.set(1, tmp);
            }

            out.printf("%d %d%n", list.get(0), list.get(1));
        }
    } main {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNext()) {
            List<Integer> list = new ArrayList<>();
            list.add(scan.nextInt());
            list.add(scan.nextInt());

            if (list.get(0).equals(0) && list.get(1).equals(0)) {      
                break;
            }

            if (list.get(0) > list.get(1)) {
                int tmp = list.get(0);
                list.set(0, list.get(1));
                list.set(1, tmp);
            }

            out.printf("%d %d%n", list.get(0), list.get(1));
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()) {
            List<Integer> list = new ArrayList<>();
            list.add(scan.nextInt());
            list.add(scan.nextInt());

            if (list.get(0).equals(0) && list.get(1).equals(0)) {      
                break;
            }

            if (list.get(0) > list.get(1)) {
                int tmp = list.get(0);
                list.set(0, list.get(1));
                list.set(1, tmp);
            }

            out.printf("%d %d%n", list.get(0), list.get(1));
        } scan.hasNext() scan.hasNext scan {
            List<Integer> list = new ArrayList<>();
            list.add(scan.nextInt());
            list.add(scan.nextInt());

            if (list.get(0).equals(0) && list.get(1).equals(0)) {      
                break;
            }

            if (list.get(0) > list.get(1)) {
                int tmp = list.get(0);
                list.set(0, list.get(1));
                list.set(1, tmp);
            }

            out.printf("%d %d%n", list.get(0), list.get(1));
        } List<Integer> list = new ArrayList<>(); list new ArrayList<>() list.add(scan.nextInt()) list.add list scan.nextInt() scan.nextInt scan list.add(scan.nextInt()) list.add list scan.nextInt() scan.nextInt scan if (list.get(0).equals(0) && list.get(1).equals(0)) {      
                break;
            } list.get(0).equals(0) && list.get(1).equals(0) list.get(0).equals(0) list.get(0).equals list.get(0) list.get list 0 0 list.get(1).equals(0) list.get(1).equals list.get(1) list.get list 1 0 {      
                break;
            } break; if (list.get(0) > list.get(1)) {
                int tmp = list.get(0);
                list.set(0, list.get(1));
                list.set(1, tmp);
            } list.get(0) > list.get(1) list.get(0) list.get list 0 list.get(1) list.get list 1 {
                int tmp = list.get(0);
                list.set(0, list.get(1));
                list.set(1, tmp);
            } int tmp = list.get(0); tmp list.get(0) list.get list 0 list.set(0, list.get(1)) list.set list 0 list.get(1) list.get list 1 list.set(1, tmp) list.set list 1 tmp out.printf("%d %d%n", list.get(0), list.get(1)) out.printf out "%d %d%n" list.get(0) list.get list 0 list.get(1) list.get list 1 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNext()) {
            List<Integer> list = new ArrayList<>();
            list.add(scan.nextInt());
            list.add(scan.nextInt());

            if (list.get(0).equals(0) && list.get(1).equals(0)) {      
                break;
            }

            if (list.get(0) > list.get(1)) {
                int tmp = list.get(0);
                list.set(0, list.get(1));
                list.set(1, tmp);
            }

            out.printf("%d %d%n", list.get(0), list.get(1));
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNext()) {
            List<Integer> list = new ArrayList<>();
            list.add(scan.nextInt());
            list.add(scan.nextInt());

            if (list.get(0).equals(0) && list.get(1).equals(0)) {      
                break;
            }

            if (list.get(0) > list.get(1)) {
                int tmp = list.get(0);
                list.set(0, list.get(1));
                list.set(1, tmp);
            }

            out.printf("%d %d%n", list.get(0), list.get(1));
        }
    }
} Main
import static java.lang.System.out;
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNext()) {
            List<Integer> list = new ArrayList<>();
            list.add(scan.nextInt());
            list.add(scan.nextInt());

            if (list.get(0).equals(0) && list.get(1).equals(0)) {      
                break;
            }

            if (list.get(0) > list.get(1)) {
                int tmp = list.get(0);
                list.set(0, list.get(1));
                list.set(1, tmp);
            }

            out.printf("%d %d%n", list.get(0), list.get(1));
        }
    }
}