
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main (String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder builder = new StringBuilder();
        int i = 1; 
        while(true) {
            String data = reader.readLine();
            String[] number = data.split(" ", 0);
            if(Integer.parseInt(number[0])== 0 && Integer.parseInt(number[1])== 0 )
                break;
            int[] numbers = sort (number);
            builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1]))
                    .append("\n");
        }        
        System.out.print(builder);
    }
    public static int[] sort ( String[] number) {
        int[] numbers = new int[2];
        Arrays.fill(numbers,0);
        numbers[0] = Integer.parseInt(number[0]);
        numbers[1] = Integer.parseInt(number[1]);
        if (numbers[0] > numbers[1]) {
            int w  = numbers[0];
            numbers[0] = numbers[1];
            numbers[1] = w;
        }
        return numbers;
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {
    public static void main (String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder builder = new StringBuilder();
        int i = 1; 
        while(true) {
            String data = reader.readLine();
            String[] number = data.split(" ", 0);
            if(Integer.parseInt(number[0])== 0 && Integer.parseInt(number[1])== 0 )
                break;
            int[] numbers = sort (number);
            builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1]))
                    .append("\n");
        }        
        System.out.print(builder);
    }
    public static int[] sort ( String[] number) {
        int[] numbers = new int[2];
        Arrays.fill(numbers,0);
        numbers[0] = Integer.parseInt(number[0]);
        numbers[1] = Integer.parseInt(number[1]);
        if (numbers[0] > numbers[1]) {
            int w  = numbers[0];
            numbers[0] = numbers[1];
            numbers[1] = w;
        }
        return numbers;
    }
} Main public static void main (String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder builder = new StringBuilder();
        int i = 1; 
        while(true) {
            String data = reader.readLine();
            String[] number = data.split(" ", 0);
            if(Integer.parseInt(number[0])== 0 && Integer.parseInt(number[1])== 0 )
                break;
            int[] numbers = sort (number);
            builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1]))
                    .append("\n");
        }        
        System.out.print(builder);
    } main {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder builder = new StringBuilder();
        int i = 1; 
        while(true) {
            String data = reader.readLine();
            String[] number = data.split(" ", 0);
            if(Integer.parseInt(number[0])== 0 && Integer.parseInt(number[1])== 0 )
                break;
            int[] numbers = sort (number);
            builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1]))
                    .append("\n");
        }        
        System.out.print(builder);
    } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) StringBuilder builder = new StringBuilder(); builder new StringBuilder() int i = 1; i 1 while(true) {
            String data = reader.readLine();
            String[] number = data.split(" ", 0);
            if(Integer.parseInt(number[0])== 0 && Integer.parseInt(number[1])== 0 )
                break;
            int[] numbers = sort (number);
            builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1]))
                    .append("\n");
        } true {
            String data = reader.readLine();
            String[] number = data.split(" ", 0);
            if(Integer.parseInt(number[0])== 0 && Integer.parseInt(number[1])== 0 )
                break;
            int[] numbers = sort (number);
            builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1]))
                    .append("\n");
        } String data = reader.readLine(); data reader.readLine() reader.readLine reader String[] number = data.split(" ", 0); number data.split(" ", 0) data.split data " " 0 if(Integer.parseInt(number[0])== 0 && Integer.parseInt(number[1])== 0 )
                break; Integer.parseInt(number[0])== 0 && Integer.parseInt(number[1])== 0 Integer.parseInt(number[0])== 0 Integer.parseInt(number[0]) Integer.parseInt Integer number[0] number 0 0 Integer.parseInt(number[1])== 0 Integer.parseInt(number[1]) Integer.parseInt Integer number[1] number 1 0 break; int[] numbers = sort (number); numbers sort (number) sort number builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1]))
                    .append("\n") builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1]))
                    .append builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1])) builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ") builder
                    .append(Integer.toString(numbers[0]))
                    .append builder
                    .append(Integer.toString(numbers[0])) builder
                    .append builder Integer.toString(numbers[0]) Integer.toString Integer numbers[0] numbers 0 " " Integer.toString(numbers[1]) Integer.toString Integer numbers[1] numbers 1 "\n" System.out.print(builder) System.out.print System.out System System.out builder String[] args args public static int[] sort ( String[] number) {
        int[] numbers = new int[2];
        Arrays.fill(numbers,0);
        numbers[0] = Integer.parseInt(number[0]);
        numbers[1] = Integer.parseInt(number[1]);
        if (numbers[0] > numbers[1]) {
            int w  = numbers[0];
            numbers[0] = numbers[1];
            numbers[1] = w;
        }
        return numbers;
    } sort {
        int[] numbers = new int[2];
        Arrays.fill(numbers,0);
        numbers[0] = Integer.parseInt(number[0]);
        numbers[1] = Integer.parseInt(number[1]);
        if (numbers[0] > numbers[1]) {
            int w  = numbers[0];
            numbers[0] = numbers[1];
            numbers[1] = w;
        }
        return numbers;
    } int[] numbers = new int[2]; numbers new int[2] 2 Arrays.fill(numbers,0) Arrays.fill Arrays numbers 0 numbers[0] = Integer.parseInt(number[0]) numbers[0] numbers 0 Integer.parseInt(number[0]) Integer.parseInt Integer number[0] number 0 numbers[1] = Integer.parseInt(number[1]) numbers[1] numbers 1 Integer.parseInt(number[1]) Integer.parseInt Integer number[1] number 1 if (numbers[0] > numbers[1]) {
            int w  = numbers[0];
            numbers[0] = numbers[1];
            numbers[1] = w;
        } numbers[0] > numbers[1] numbers[0] numbers 0 numbers[1] numbers 1 {
            int w  = numbers[0];
            numbers[0] = numbers[1];
            numbers[1] = w;
        } int w  = numbers[0]; w numbers[0] numbers 0 numbers[0] = numbers[1] numbers[0] numbers 0 numbers[1] numbers 1 numbers[1] = w numbers[1] numbers 1 w return numbers; numbers String[] number number public class Main {
    public static void main (String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder builder = new StringBuilder();
        int i = 1; 
        while(true) {
            String data = reader.readLine();
            String[] number = data.split(" ", 0);
            if(Integer.parseInt(number[0])== 0 && Integer.parseInt(number[1])== 0 )
                break;
            int[] numbers = sort (number);
            builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1]))
                    .append("\n");
        }        
        System.out.print(builder);
    }
    public static int[] sort ( String[] number) {
        int[] numbers = new int[2];
        Arrays.fill(numbers,0);
        numbers[0] = Integer.parseInt(number[0]);
        numbers[1] = Integer.parseInt(number[1]);
        if (numbers[0] > numbers[1]) {
            int w  = numbers[0];
            numbers[0] = numbers[1];
            numbers[1] = w;
        }
        return numbers;
    }
} public class Main {
    public static void main (String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder builder = new StringBuilder();
        int i = 1; 
        while(true) {
            String data = reader.readLine();
            String[] number = data.split(" ", 0);
            if(Integer.parseInt(number[0])== 0 && Integer.parseInt(number[1])== 0 )
                break;
            int[] numbers = sort (number);
            builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1]))
                    .append("\n");
        }        
        System.out.print(builder);
    }
    public static int[] sort ( String[] number) {
        int[] numbers = new int[2];
        Arrays.fill(numbers,0);
        numbers[0] = Integer.parseInt(number[0]);
        numbers[1] = Integer.parseInt(number[1]);
        if (numbers[0] > numbers[1]) {
            int w  = numbers[0];
            numbers[0] = numbers[1];
            numbers[1] = w;
        }
        return numbers;
    }
} Main

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main (String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder builder = new StringBuilder();
        int i = 1; 
        while(true) {
            String data = reader.readLine();
            String[] number = data.split(" ", 0);
            if(Integer.parseInt(number[0])== 0 && Integer.parseInt(number[1])== 0 )
                break;
            int[] numbers = sort (number);
            builder
                    .append(Integer.toString(numbers[0]))
                    .append(" ")
                    .append(Integer.toString(numbers[1]))
                    .append("\n");
        }        
        System.out.print(builder);
    }
    public static int[] sort ( String[] number) {
        int[] numbers = new int[2];
        Arrays.fill(numbers,0);
        numbers[0] = Integer.parseInt(number[0]);
        numbers[1] = Integer.parseInt(number[1]);
        if (numbers[0] > numbers[1]) {
            int w  = numbers[0];
            numbers[0] = numbers[1];
            numbers[1] = w;
        }
        return numbers;
    }
}