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

public class Main {

    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            String[] strArray = new String[2];
            
            while(line.equals("0 0") == false){
            	strArray = line.split("\\s");
            	if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	}
            	
                line = br.readLine();
            }
            br.close();
        } catch (IOException e) {
            System.err.println(e);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util public class Main {

    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            String[] strArray = new String[2];
            
            while(line.equals("0 0") == false){
            	strArray = line.split("\\s");
            	if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	}
            	
                line = br.readLine();
            }
            br.close();
        } catch (IOException e) {
            System.err.println(e);
        }
    }
} Main public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            String[] strArray = new String[2];
            
            while(line.equals("0 0") == false){
            	strArray = line.split("\\s");
            	if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	}
            	
                line = br.readLine();
            }
            br.close();
        } catch (IOException e) {
            System.err.println(e);
        }
    } main {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            String[] strArray = new String[2];
            
            while(line.equals("0 0") == false){
            	strArray = line.split("\\s");
            	if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	}
            	
                line = br.readLine();
            }
            br.close();
        } catch (IOException e) {
            System.err.println(e);
        }
    } try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            String[] strArray = new String[2];
            
            while(line.equals("0 0") == false){
            	strArray = line.split("\\s");
            	if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	}
            	
                line = br.readLine();
            }
            br.close();
        } catch (IOException e) {
            System.err.println(e);
        } catch (IOException e) {
            System.err.println(e);
        } IOException e {
            System.err.println(e);
        } System.err.println(e) System.err.println System.err System System.err e {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            String[] strArray = new String[2];
            
            while(line.equals("0 0") == false){
            	strArray = line.split("\\s");
            	if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	}
            	
                line = br.readLine();
            }
            br.close();
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br String[] strArray = new String[2]; strArray new String[2] 2 while(line.equals("0 0") == false){
            	strArray = line.split("\\s");
            	if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	}
            	
                line = br.readLine();
            } line.equals("0 0") == false line.equals("0 0") line.equals line "0 0" false {
            	strArray = line.split("\\s");
            	if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	}
            	
                line = br.readLine();
            } strArray = line.split("\\s") strArray line.split("\\s") line.split line "\\s" if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	} Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1]) Integer.parseInt(strArray[0]) Integer.parseInt Integer strArray[0] strArray 0 Integer.parseInt(strArray[1]) Integer.parseInt Integer strArray[1] strArray 1 {
            		System.out.println(strArray[1] + " " + strArray[0]);
            	} System.out.println(strArray[1] + " " + strArray[0]) System.out.println System.out System System.out strArray[1] + " " + strArray[0] strArray[1] + " " + strArray[0] strArray[1] strArray 1 " " strArray[0] strArray 0 {
            		System.out.println(strArray[0] + " " + strArray[1]);
            	} System.out.println(strArray[0] + " " + strArray[1]) System.out.println System.out System System.out strArray[0] + " " + strArray[1] strArray[0] + " " + strArray[1] strArray[0] strArray 0 " " strArray[1] strArray 1 line = br.readLine() line br.readLine() br.readLine br br.close() br.close br String[] args args public class Main {

    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            String[] strArray = new String[2];
            
            while(line.equals("0 0") == false){
            	strArray = line.split("\\s");
            	if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	}
            	
                line = br.readLine();
            }
            br.close();
        } catch (IOException e) {
            System.err.println(e);
        }
    }
} public class Main {

    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            String[] strArray = new String[2];
            
            while(line.equals("0 0") == false){
            	strArray = line.split("\\s");
            	if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	}
            	
                line = br.readLine();
            }
            br.close();
        } catch (IOException e) {
            System.err.println(e);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {

    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            String[] strArray = new String[2];
            
            while(line.equals("0 0") == false){
            	strArray = line.split("\\s");
            	if(Integer.parseInt(strArray[0]) > Integer.parseInt(strArray[1])){
            		System.out.println(strArray[1] + " " + strArray[0]);
            	}else{
            		System.out.println(strArray[0] + " " + strArray[1]);
            	}
            	
                line = br.readLine();
            }
            br.close();
        } catch (IOException e) {
            System.err.println(e);
        }
    }
}