import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main{

	public static void main(String[] args) throws Exception{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while(true){

			String[] line = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);
			int y = Integer.parseInt(line[1]);

			if(x == 0 && y == 0){
				break;
			}

			if(x <= y){
				sb.append(x + " " + y + "\n");
			}else{
				sb.append(y + " " + x + "\n");
			}

		}

		System.out.print(sb);

	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io class Main{

	public static void main(String[] args) throws Exception{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while(true){

			String[] line = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);
			int y = Integer.parseInt(line[1]);

			if(x == 0 && y == 0){
				break;
			}

			if(x <= y){
				sb.append(x + " " + y + "\n");
			}else{
				sb.append(y + " " + x + "\n");
			}

		}

		System.out.print(sb);

	}
} Main public static void main(String[] args) throws Exception{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while(true){

			String[] line = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);
			int y = Integer.parseInt(line[1]);

			if(x == 0 && y == 0){
				break;
			}

			if(x <= y){
				sb.append(x + " " + y + "\n");
			}else{
				sb.append(y + " " + x + "\n");
			}

		}

		System.out.print(sb);

	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while(true){

			String[] line = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);
			int y = Integer.parseInt(line[1]);

			if(x == 0 && y == 0){
				break;
			}

			if(x <= y){
				sb.append(x + " " + y + "\n");
			}else{
				sb.append(y + " " + x + "\n");
			}

		}

		System.out.print(sb);

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() while(true){

			String[] line = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);
			int y = Integer.parseInt(line[1]);

			if(x == 0 && y == 0){
				break;
			}

			if(x <= y){
				sb.append(x + " " + y + "\n");
			}else{
				sb.append(y + " " + x + "\n");
			}

		} true {

			String[] line = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);
			int y = Integer.parseInt(line[1]);

			if(x == 0 && y == 0){
				break;
			}

			if(x <= y){
				sb.append(x + " " + y + "\n");
			}else{
				sb.append(y + " " + x + "\n");
			}

		} String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int x = Integer.parseInt(line[0]); x Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int y = Integer.parseInt(line[1]); y Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 if(x == 0 && y == 0){
				break;
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				break;
			} break; if(x <= y){
				sb.append(x + " " + y + "\n");
			}else{
				sb.append(y + " " + x + "\n");
			} x <= y x y {
				sb.append(x + " " + y + "\n");
			} sb.append(x + " " + y + "\n") sb.append sb x + " " + y + "\n" y x + " " + y + "\n" x " " y "\n" {
				sb.append(y + " " + x + "\n");
			} sb.append(y + " " + x + "\n") sb.append sb y + " " + x + "\n" x y + " " + x + "\n" y " " x "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args
import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main{

	public static void main(String[] args) throws Exception{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while(true){

			String[] line = br.readLine().split(" ");
			int x = Integer.parseInt(line[0]);
			int y = Integer.parseInt(line[1]);

			if(x == 0 && y == 0){
				break;
			}

			if(x <= y){
				sb.append(x + " " + y + "\n");
			}else{
				sb.append(y + " " + x + "\n");
			}

		}

		System.out.print(sb);

	}
}