import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	while(scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int x = Integer.parseInt(inputs[0]);
	    int y = Integer.parseInt(inputs[1]);
	    if (x == 0 && y == 0) {
		break;
	    }
	    if (x < y) {
		System.out.println(x + " " + y);
	    } else {
		System.out.println(y + " " + x);
	    }
	}
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	while(scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int x = Integer.parseInt(inputs[0]);
	    int y = Integer.parseInt(inputs[1]);
	    if (x == 0 && y == 0) {
		break;
	    }
	    if (x < y) {
		System.out.println(x + " " + y);
	    } else {
		System.out.println(y + " " + x);
	    }
	}
    }
} Main public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	while(scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int x = Integer.parseInt(inputs[0]);
	    int y = Integer.parseInt(inputs[1]);
	    if (x == 0 && y == 0) {
		break;
	    }
	    if (x < y) {
		System.out.println(x + " " + y);
	    } else {
		System.out.println(y + " " + x);
	    }
	}
    } main {
	Scanner scan = new Scanner(System.in);
	while(scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int x = Integer.parseInt(inputs[0]);
	    int y = Integer.parseInt(inputs[1]);
	    if (x == 0 && y == 0) {
		break;
	    }
	    if (x < y) {
		System.out.println(x + " " + y);
	    } else {
		System.out.println(y + " " + x);
	    }
	}
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int x = Integer.parseInt(inputs[0]);
	    int y = Integer.parseInt(inputs[1]);
	    if (x == 0 && y == 0) {
		break;
	    }
	    if (x < y) {
		System.out.println(x + " " + y);
	    } else {
		System.out.println(y + " " + x);
	    }
	} scan.hasNext() scan.hasNext scan {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int x = Integer.parseInt(inputs[0]);
	    int y = Integer.parseInt(inputs[1]);
	    if (x == 0 && y == 0) {
		break;
	    }
	    if (x < y) {
		System.out.println(x + " " + y);
	    } else {
		System.out.println(y + " " + x);
	    }
	} String input = scan.nextLine(); input scan.nextLine() scan.nextLine scan String[] inputs = input.split(" "); inputs input.split(" ") input.split input " " int x = Integer.parseInt(inputs[0]); x Integer.parseInt(inputs[0]) Integer.parseInt Integer inputs[0] inputs 0 int y = Integer.parseInt(inputs[1]); y Integer.parseInt(inputs[1]) Integer.parseInt Integer inputs[1] inputs 1 if (x == 0 && y == 0) {
		break;
	    } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
		break;
	    } break; 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 String[] args args public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	while(scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int x = Integer.parseInt(inputs[0]);
	    int y = Integer.parseInt(inputs[1]);
	    if (x == 0 && y == 0) {
		break;
	    }
	    if (x < y) {
		System.out.println(x + " " + y);
	    } else {
		System.out.println(y + " " + x);
	    }
	}
    }
} public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	while(scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int x = Integer.parseInt(inputs[0]);
	    int y = Integer.parseInt(inputs[1]);
	    if (x == 0 && y == 0) {
		break;
	    }
	    if (x < y) {
		System.out.println(x + " " + y);
	    } else {
		System.out.println(y + " " + x);
	    }
	}
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	while(scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int x = Integer.parseInt(inputs[0]);
	    int y = Integer.parseInt(inputs[1]);
	    if (x == 0 && y == 0) {
		break;
	    }
	    if (x < y) {
		System.out.println(x + " " + y);
	    } else {
		System.out.println(y + " " + x);
	    }
	}
    }
}