import java.util.Scanner;

public class Main {
    private static Scanner scan;

    public static void main(String[] args) {
        scan = new Scanner(System.in);
        while (true) {
            int x = scan.nextInt();
            int y = scan.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            comp(x,y);
        }
    }

    private static void comp(int x,int y) {
        if (x < y) {
            System.out.println(x +" "+y);
        } else {
            System.out.println(y +" "+x);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    private static Scanner scan;

    public static void main(String[] args) {
        scan = new Scanner(System.in);
        while (true) {
            int x = scan.nextInt();
            int y = scan.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            comp(x,y);
        }
    }

    private static void comp(int x,int y) {
        if (x < y) {
            System.out.println(x +" "+y);
        } else {
            System.out.println(y +" "+x);
        }
    }
} Main private static Scanner scan; scan public static void main(String[] args) {
        scan = new Scanner(System.in);
        while (true) {
            int x = scan.nextInt();
            int y = scan.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            comp(x,y);
        }
    } main {
        scan = new Scanner(System.in);
        while (true) {
            int x = scan.nextInt();
            int y = scan.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            comp(x,y);
        }
    } scan = new Scanner(System.in) scan new Scanner(System.in) while (true) {
            int x = scan.nextInt();
            int y = scan.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            comp(x,y);
        } true {
            int x = scan.nextInt();
            int y = scan.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            comp(x,y);
        } int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan if (x == 0 && y == 0) {
                break;
            } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
                break;
            } break; comp(x,y) comp x y String[] args args private static void comp(int x,int y) {
        if (x < y) {
            System.out.println(x +" "+y);
        } else {
            System.out.println(y +" "+x);
        }
    } comp {
        if (x < y) {
            System.out.println(x +" "+y);
        } else {
            System.out.println(y +" "+x);
        }
    } if (x < y) {
            System.out.println(x +" "+y);
        } else {
            System.out.println(y +" "+x);
        } 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 {
            System.out.println(y +" "+x);
        } System.out.println(y +" "+x) System.out.println System.out System System.out y +" "+x y +" "+x y " " x int x x int y y public class Main {
    private static Scanner scan;

    public static void main(String[] args) {
        scan = new Scanner(System.in);
        while (true) {
            int x = scan.nextInt();
            int y = scan.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            comp(x,y);
        }
    }

    private static void comp(int x,int y) {
        if (x < y) {
            System.out.println(x +" "+y);
        } else {
            System.out.println(y +" "+x);
        }
    }
} public class Main {
    private static Scanner scan;

    public static void main(String[] args) {
        scan = new Scanner(System.in);
        while (true) {
            int x = scan.nextInt();
            int y = scan.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            comp(x,y);
        }
    }

    private static void comp(int x,int y) {
        if (x < y) {
            System.out.println(x +" "+y);
        } else {
            System.out.println(y +" "+x);
        }
    }
} Main
import java.util.Scanner;

public class Main {
    private static Scanner scan;

    public static void main(String[] args) {
        scan = new Scanner(System.in);
        while (true) {
            int x = scan.nextInt();
            int y = scan.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            comp(x,y);
        }
    }

    private static void comp(int x,int y) {
        if (x < y) {
            System.out.println(x +" "+y);
        } else {
            System.out.println(y +" "+x);
        }
    }
}