import java.io.*;

class Main {
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            int x = 0;
            int y = 0;
            int cnt = 0;
            boolean end = false;
            
            while(!end){
            	String temp = br.readLine();
            	String[] numbers = temp.split(" ");
            	x = Integer.parseInt(numbers[0]);
            	y = Integer.parseInt(numbers[1]);
            	
            	if((x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000){
            		end = true;
            	}else if(x > y || x == y){
            		System.out.println(y + " " + x);
            	}else if(x < y){
            		System.out.println(x + " " + y);
            	}
            	cnt++;
            }
            

        } catch (Exception e) {
            System.out.println(e);
        }
    }
} import java.io.*; io.* java class Main {
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            int x = 0;
            int y = 0;
            int cnt = 0;
            boolean end = false;
            
            while(!end){
            	String temp = br.readLine();
            	String[] numbers = temp.split(" ");
            	x = Integer.parseInt(numbers[0]);
            	y = Integer.parseInt(numbers[1]);
            	
            	if((x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000){
            		end = true;
            	}else if(x > y || x == y){
            		System.out.println(y + " " + x);
            	}else if(x < y){
            		System.out.println(x + " " + y);
            	}
            	cnt++;
            }
            

        } catch (Exception e) {
            System.out.println(e);
        }
    }
} Main public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            int x = 0;
            int y = 0;
            int cnt = 0;
            boolean end = false;
            
            while(!end){
            	String temp = br.readLine();
            	String[] numbers = temp.split(" ");
            	x = Integer.parseInt(numbers[0]);
            	y = Integer.parseInt(numbers[1]);
            	
            	if((x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000){
            		end = true;
            	}else if(x > y || x == y){
            		System.out.println(y + " " + x);
            	}else if(x < y){
            		System.out.println(x + " " + y);
            	}
            	cnt++;
            }
            

        } catch (Exception e) {
            System.out.println(e);
        }
    } main {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            int x = 0;
            int y = 0;
            int cnt = 0;
            boolean end = false;
            
            while(!end){
            	String temp = br.readLine();
            	String[] numbers = temp.split(" ");
            	x = Integer.parseInt(numbers[0]);
            	y = Integer.parseInt(numbers[1]);
            	
            	if((x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000){
            		end = true;
            	}else if(x > y || x == y){
            		System.out.println(y + " " + x);
            	}else if(x < y){
            		System.out.println(x + " " + y);
            	}
            	cnt++;
            }
            

        } catch (Exception e) {
            System.out.println(e);
        }
    } try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            int x = 0;
            int y = 0;
            int cnt = 0;
            boolean end = false;
            
            while(!end){
            	String temp = br.readLine();
            	String[] numbers = temp.split(" ");
            	x = Integer.parseInt(numbers[0]);
            	y = Integer.parseInt(numbers[1]);
            	
            	if((x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000){
            		end = true;
            	}else if(x > y || x == y){
            		System.out.println(y + " " + x);
            	}else if(x < y){
            		System.out.println(x + " " + y);
            	}
            	cnt++;
            }
            

        } catch (Exception e) {
            System.out.println(e);
        } catch (Exception e) {
            System.out.println(e);
        } Exception e {
            System.out.println(e);
        } System.out.println(e) System.out.println System.out System System.out e {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            int x = 0;
            int y = 0;
            int cnt = 0;
            boolean end = false;
            
            while(!end){
            	String temp = br.readLine();
            	String[] numbers = temp.split(" ");
            	x = Integer.parseInt(numbers[0]);
            	y = Integer.parseInt(numbers[1]);
            	
            	if((x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000){
            		end = true;
            	}else if(x > y || x == y){
            		System.out.println(y + " " + x);
            	}else if(x < y){
            		System.out.println(x + " " + y);
            	}
            	cnt++;
            }
            

        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int x = 0; x 0 int y = 0; y 0 int cnt = 0; cnt 0 boolean end = false; end false while(!end){
            	String temp = br.readLine();
            	String[] numbers = temp.split(" ");
            	x = Integer.parseInt(numbers[0]);
            	y = Integer.parseInt(numbers[1]);
            	
            	if((x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000){
            		end = true;
            	}else if(x > y || x == y){
            		System.out.println(y + " " + x);
            	}else if(x < y){
            		System.out.println(x + " " + y);
            	}
            	cnt++;
            } !end end {
            	String temp = br.readLine();
            	String[] numbers = temp.split(" ");
            	x = Integer.parseInt(numbers[0]);
            	y = Integer.parseInt(numbers[1]);
            	
            	if((x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000){
            		end = true;
            	}else if(x > y || x == y){
            		System.out.println(y + " " + x);
            	}else if(x < y){
            		System.out.println(x + " " + y);
            	}
            	cnt++;
            } String temp = br.readLine(); temp br.readLine() br.readLine br String[] numbers = temp.split(" "); numbers temp.split(" ") temp.split temp " " x = Integer.parseInt(numbers[0]) x Integer.parseInt(numbers[0]) Integer.parseInt Integer numbers[0] numbers 0 y = Integer.parseInt(numbers[1]) y Integer.parseInt(numbers[1]) Integer.parseInt Integer numbers[1] numbers 1 if((x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000){
            		end = true;
            	}else if(x > y || x == y){
            		System.out.println(y + " " + x);
            	}else if(x < y){
            		System.out.println(x + " " + y);
            	} (x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000 (x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000 (x < 0 && y > 10000) x < 0 x 0 y > 10000 y 10000 (x == 0 && y == 0) x == 0 x 0 y == 0 y 0 cnt > 3000 cnt 3000 {
            		end = true;
            	} end = true end true if(x > y || x == y){
            		System.out.println(y + " " + x);
            	}else if(x < y){
            		System.out.println(x + " " + y);
            	} x > y || x == y x > y x y x == y x y {
            		System.out.println(y + " " + x);
            	} System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x if(x < y){
            		System.out.println(x + " " + y);
            	} x < y x y {
            		System.out.println(x + " " + y);
            	} System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y cnt++ cnt String[] args args
import java.io.*;

class Main {
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            int x = 0;
            int y = 0;
            int cnt = 0;
            boolean end = false;
            
            while(!end){
            	String temp = br.readLine();
            	String[] numbers = temp.split(" ");
            	x = Integer.parseInt(numbers[0]);
            	y = Integer.parseInt(numbers[1]);
            	
            	if((x < 0 && y > 10000) || (x == 0 && y == 0) || cnt > 3000){
            		end = true;
            	}else if(x > y || x == y){
            		System.out.println(y + " " + x);
            	}else if(x < y){
            		System.out.println(x + " " + y);
            	}
            	cnt++;
            }
            

        } catch (Exception e) {
            System.out.println(e);
        }
    }
}