import java.util.Scanner;
import java.util.Arrays;

class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();

        while(true){
            int x = scan.nextInt();
            int y = scan.nextInt();

            int[] sort = {x,y};
            Arrays.sort(sort);

            if(x == 0 && y == 0) {
                break;
            }
            sb.append(sort[0]).append(" ").append(sort[1]).append("\n");
        }
        System.out.print(sb);
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();

        while(true){
            int x = scan.nextInt();
            int y = scan.nextInt();

            int[] sort = {x,y};
            Arrays.sort(sort);

            if(x == 0 && y == 0) {
                break;
            }
            sb.append(sort[0]).append(" ").append(sort[1]).append("\n");
        }
        System.out.print(sb);
    }
} Main public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();

        while(true){
            int x = scan.nextInt();
            int y = scan.nextInt();

            int[] sort = {x,y};
            Arrays.sort(sort);

            if(x == 0 && y == 0) {
                break;
            }
            sb.append(sort[0]).append(" ").append(sort[1]).append("\n");
        }
        System.out.print(sb);
    } main {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();

        while(true){
            int x = scan.nextInt();
            int y = scan.nextInt();

            int[] sort = {x,y};
            Arrays.sort(sort);

            if(x == 0 && y == 0) {
                break;
            }
            sb.append(sort[0]).append(" ").append(sort[1]).append("\n");
        }
        System.out.print(sb);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() while(true){
            int x = scan.nextInt();
            int y = scan.nextInt();

            int[] sort = {x,y};
            Arrays.sort(sort);

            if(x == 0 && y == 0) {
                break;
            }
            sb.append(sort[0]).append(" ").append(sort[1]).append("\n");
        } true {
            int x = scan.nextInt();
            int y = scan.nextInt();

            int[] sort = {x,y};
            Arrays.sort(sort);

            if(x == 0 && y == 0) {
                break;
            }
            sb.append(sort[0]).append(" ").append(sort[1]).append("\n");
        } int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan int[] sort = {x,y}; sort {x,y} x y Arrays.sort(sort) Arrays.sort Arrays sort if(x == 0 && y == 0) {
                break;
            } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
                break;
            } break; sb.append(sort[0]).append(" ").append(sort[1]).append("\n") sb.append(sort[0]).append(" ").append(sort[1]).append sb.append(sort[0]).append(" ").append(sort[1]) sb.append(sort[0]).append(" ").append sb.append(sort[0]).append(" ") sb.append(sort[0]).append sb.append(sort[0]) sb.append sb sort[0] sort 0 " " sort[1] sort 1 "\n" System.out.print(sb) System.out.print System.out System System.out sb String args[] args
import java.util.Scanner;
import java.util.Arrays;

class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();

        while(true){
            int x = scan.nextInt();
            int y = scan.nextInt();

            int[] sort = {x,y};
            Arrays.sort(sort);

            if(x == 0 && y == 0) {
                break;
            }
            sb.append(sort[0]).append(" ").append(sort[1]).append("\n");
        }
        System.out.print(sb);
    }
}