import java.lang.Math;
import java.util.ArrayList;
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            int a = sn.nextInt();
            int b = sn.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            System.out.println(String.format("%d %d", Math.min(a, b), Math.max(a, b)));
        }
    }
} import java.lang.Math; Math java.lang import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            int a = sn.nextInt();
            int b = sn.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            System.out.println(String.format("%d %d", Math.min(a, b), Math.max(a, b)));
        }
    }
} Main public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            int a = sn.nextInt();
            int b = sn.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            System.out.println(String.format("%d %d", Math.min(a, b), Math.max(a, b)));
        }
    } main {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            int a = sn.nextInt();
            int b = sn.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            System.out.println(String.format("%d %d", Math.min(a, b), Math.max(a, b)));
        }
    } Scanner sn = new Scanner(System.in); sn new Scanner(System.in) while (sn.hasNext()) {
            int a = sn.nextInt();
            int b = sn.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            System.out.println(String.format("%d %d", Math.min(a, b), Math.max(a, b)));
        } sn.hasNext() sn.hasNext sn {
            int a = sn.nextInt();
            int b = sn.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            System.out.println(String.format("%d %d", Math.min(a, b), Math.max(a, b)));
        } int a = sn.nextInt(); a sn.nextInt() sn.nextInt sn int b = sn.nextInt(); b sn.nextInt() sn.nextInt sn if (a == 0 && b == 0) {
                break;
            } a == 0 && b == 0 a == 0 a 0 b == 0 b 0 {
                break;
            } break; System.out.println(String.format("%d %d", Math.min(a, b), Math.max(a, b))) System.out.println System.out System System.out String.format("%d %d", Math.min(a, b), Math.max(a, b)) String.format String "%d %d" Math.min(a, b) Math.min Math a b Math.max(a, b) Math.max Math a b String[] args args
import java.lang.Math;
import java.util.ArrayList;
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            int a = sn.nextInt();
            int b = sn.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            System.out.println(String.format("%d %d", Math.min(a, b), Math.max(a, b)));
        }
    }
}