import java.util.Scanner;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\n");
        String[] s = sc.next().split(" ");
        int a = Integer.parseInt(s[0]);
        int b = Integer.parseInt(s[1]);
        while (!(a == 0 && b == 0)) {
            if (a <= b) {
                System.out.println(a + " " + b);
            } else {
                System.out.println(b + " " + a);
            }
            s = sc.next().split(" ");
            a = Integer.parseInt(s[0]);
            b = Integer.parseInt(s[1]);
        }
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\n");
        String[] s = sc.next().split(" ");
        int a = Integer.parseInt(s[0]);
        int b = Integer.parseInt(s[1]);
        while (!(a == 0 && b == 0)) {
            if (a <= b) {
                System.out.println(a + " " + b);
            } else {
                System.out.println(b + " " + a);
            }
            s = sc.next().split(" ");
            a = Integer.parseInt(s[0]);
            b = Integer.parseInt(s[1]);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\n");
        String[] s = sc.next().split(" ");
        int a = Integer.parseInt(s[0]);
        int b = Integer.parseInt(s[1]);
        while (!(a == 0 && b == 0)) {
            if (a <= b) {
                System.out.println(a + " " + b);
            } else {
                System.out.println(b + " " + a);
            }
            s = sc.next().split(" ");
            a = Integer.parseInt(s[0]);
            b = Integer.parseInt(s[1]);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\n");
        String[] s = sc.next().split(" ");
        int a = Integer.parseInt(s[0]);
        int b = Integer.parseInt(s[1]);
        while (!(a == 0 && b == 0)) {
            if (a <= b) {
                System.out.println(a + " " + b);
            } else {
                System.out.println(b + " " + a);
            }
            s = sc.next().split(" ");
            a = Integer.parseInt(s[0]);
            b = Integer.parseInt(s[1]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) sc.useDelimiter("\n") sc.useDelimiter sc "\n" String[] s = sc.next().split(" "); s sc.next().split(" ") sc.next().split sc.next() sc.next sc " " int a = Integer.parseInt(s[0]); a Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 int b = Integer.parseInt(s[1]); b Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 while (!(a == 0 && b == 0)) {
            if (a <= b) {
                System.out.println(a + " " + b);
            } else {
                System.out.println(b + " " + a);
            }
            s = sc.next().split(" ");
            a = Integer.parseInt(s[0]);
            b = Integer.parseInt(s[1]);
        } !(a == 0 && b == 0) (a == 0 && b == 0) a == 0 a 0 b == 0 b 0 {
            if (a <= b) {
                System.out.println(a + " " + b);
            } else {
                System.out.println(b + " " + a);
            }
            s = sc.next().split(" ");
            a = Integer.parseInt(s[0]);
            b = Integer.parseInt(s[1]);
        } 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(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b {
                System.out.println(b + " " + a);
            } System.out.println(b + " " + a) System.out.println System.out System System.out b + " " + a b + " " + a b " " a s = sc.next().split(" ") s sc.next().split(" ") sc.next().split sc.next() sc.next sc " " a = Integer.parseInt(s[0]) a Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 b = Integer.parseInt(s[1]) b Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 String[] args args
import java.util.Scanner;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\n");
        String[] s = sc.next().split(" ");
        int a = Integer.parseInt(s[0]);
        int b = Integer.parseInt(s[1]);
        while (!(a == 0 && b == 0)) {
            if (a <= b) {
                System.out.println(a + " " + b);
            } else {
                System.out.println(b + " " + a);
            }
            s = sc.next().split(" ");
            a = Integer.parseInt(s[0]);
            b = Integer.parseInt(s[1]);
        }
    }
}