import java.util.Scanner;                                                   
import java.util.Arrays;
   
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        
        while(true) {
            int x = scan.nextInt(), y = scan.nextInt();
            int[] data = {x, y};
            Arrays.sort(data);     
            if(x == 0 && y == 0) break;
            else {
                System.out.println(data[0] + " " + data[1]);
            } 
        } 
    } 
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        
        while(true) {
            int x = scan.nextInt(), y = scan.nextInt();
            int[] data = {x, y};
            Arrays.sort(data);     
            if(x == 0 && y == 0) break;
            else {
                System.out.println(data[0] + " " + data[1]);
            } 
        } 
    } 
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        
        while(true) {
            int x = scan.nextInt(), y = scan.nextInt();
            int[] data = {x, y};
            Arrays.sort(data);     
            if(x == 0 && y == 0) break;
            else {
                System.out.println(data[0] + " " + data[1]);
            } 
        } 
    } main {
        Scanner scan = new Scanner(System.in);
        
        while(true) {
            int x = scan.nextInt(), y = scan.nextInt();
            int[] data = {x, y};
            Arrays.sort(data);     
            if(x == 0 && y == 0) break;
            else {
                System.out.println(data[0] + " " + data[1]);
            } 
        } 
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(true) {
            int x = scan.nextInt(), y = scan.nextInt();
            int[] data = {x, y};
            Arrays.sort(data);     
            if(x == 0 && y == 0) break;
            else {
                System.out.println(data[0] + " " + data[1]);
            } 
        } true {
            int x = scan.nextInt(), y = scan.nextInt();
            int[] data = {x, y};
            Arrays.sort(data);     
            if(x == 0 && y == 0) break;
            else {
                System.out.println(data[0] + " " + data[1]);
            } 
        } int x = scan.nextInt() x scan.nextInt() scan.nextInt scan y = scan.nextInt(); y scan.nextInt() scan.nextInt scan int[] data = {x, y}; data {x, y} x y Arrays.sort(data) Arrays.sort Arrays data if(x == 0 && y == 0) break;
            else {
                System.out.println(data[0] + " " + data[1]);
            } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 break; {
                System.out.println(data[0] + " " + data[1]);
            } System.out.println(data[0] + " " + data[1]) System.out.println System.out System System.out data[0] + " " + data[1] data[0] + " " + data[1] data[0] data 0 " " data[1] data 1 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        
        while(true) {
            int x = scan.nextInt(), y = scan.nextInt();
            int[] data = {x, y};
            Arrays.sort(data);     
            if(x == 0 && y == 0) break;
            else {
                System.out.println(data[0] + " " + data[1]);
            } 
        } 
    } 
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        
        while(true) {
            int x = scan.nextInt(), y = scan.nextInt();
            int[] data = {x, y};
            Arrays.sort(data);     
            if(x == 0 && y == 0) break;
            else {
                System.out.println(data[0] + " " + data[1]);
            } 
        } 
    } 
} Main
import java.util.Scanner;                                                   
import java.util.Arrays;
   
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        
        while(true) {
            int x = scan.nextInt(), y = scan.nextInt();
            int[] data = {x, y};
            Arrays.sort(data);     
            if(x == 0 && y == 0) break;
            else {
                System.out.println(data[0] + " " + data[1]);
            } 
        } 
    } 
}