/*
 * Aizu Online Judge
 */

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

/**
 *
 * @author yoshkur
 */
public class Main {

	/**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData();
			inputData.setDataFromLines(br);
			inputData.setValues();
			Processing processing = new Processing(inputData);
			System.out.println(processing.getResult());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	}
}

class InputData {

	public static final String SEPARATOR = " ";

	private List<String> rows = new ArrayList<>();
	private String row;

	public InputData() {
	}

	public void setDataFromLine(BufferedReader br) throws IOException {
		this.row = br.readLine().trim();
	}

	public void setDataFromLines(BufferedReader br) throws IOException {
		String line;
		while ((line = br.readLine()) != null) {
			this.rows.add(line.trim());
		}
	}

	public void setValues() {

	}

	public List<String> getRows() {
		return rows;
	}

	public void setRows(List<String> rows) {
		this.rows = rows;
	}

}

class Processing {

	private static final String RETCODE = System.getProperty("line.separator");

	private InputData inputData;

	public Processing(InputData inputData) {
		this.inputData = inputData;
	}

	public String getResult() {
		String result = null;
		StringBuilder sb = new StringBuilder();
		for (String str : this.inputData.getRows()) {
			String[] values = str.split(InputData.SEPARATOR);
			Integer num0 = Integer.valueOf(values[0]);
			Integer num1 = Integer.valueOf(values[1]);
			if (num0 == 0 && num1 == 0) {
				break;
			}
			if (num0 > num1) {
				Integer temp = num0;
				num0 = num1;
				num1 = temp;
			}
			
			sb.append(num0);
			sb.append(InputData.SEPARATOR);
			sb.append(num1);
			sb.append(RETCODE);
		}
		result = sb.toString().trim();
		return result;
	}
} 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 import java.util.Collections; Collections java.util import java.util.List; List java.util public class Main {

	/**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData();
			inputData.setDataFromLines(br);
			inputData.setValues();
			Processing processing = new Processing(inputData);
			System.out.println(processing.getResult());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	}
} Main /**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData();
			inputData.setDataFromLines(br);
			inputData.setValues();
			Processing processing = new Processing(inputData);
			System.out.println(processing.getResult());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	} main {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData();
			inputData.setDataFromLines(br);
			inputData.setValues();
			Processing processing = new Processing(inputData);
			System.out.println(processing.getResult());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	} try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData();
			inputData.setDataFromLines(br);
			inputData.setValues();
			Processing processing = new Processing(inputData);
			System.out.println(processing.getResult());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		} IOException | NumberFormatException e {
			System.err.println(e.getLocalizedMessage());
		} System.err.println(e.getLocalizedMessage()) System.err.println System.err System System.err e.getLocalizedMessage() e.getLocalizedMessage e {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData();
			inputData.setDataFromLines(br);
			inputData.setValues();
			Processing processing = new Processing(inputData);
			System.out.println(processing.getResult());

		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) InputData inputData = new InputData(); inputData new InputData() inputData.setDataFromLines(br) inputData.setDataFromLines inputData br inputData.setValues() inputData.setValues inputData Processing processing = new Processing(inputData); processing new Processing(inputData) System.out.println(processing.getResult()) System.out.println System.out System System.out processing.getResult() processing.getResult processing String[] args args class InputData {

	public static final String SEPARATOR = " ";

	private List<String> rows = new ArrayList<>();
	private String row;

	public InputData() {
	}

	public void setDataFromLine(BufferedReader br) throws IOException {
		this.row = br.readLine().trim();
	}

	public void setDataFromLines(BufferedReader br) throws IOException {
		String line;
		while ((line = br.readLine()) != null) {
			this.rows.add(line.trim());
		}
	}

	public void setValues() {

	}

	public List<String> getRows() {
		return rows;
	}

	public void setRows(List<String> rows) {
		this.rows = rows;
	}

} InputData public static final String SEPARATOR = " "; SEPARATOR " " private List<String> rows = new ArrayList<>(); rows new ArrayList<>() private String row; row public InputData() {
	} InputData {
	} public void setDataFromLine(BufferedReader br) throws IOException {
		this.row = br.readLine().trim();
	} setDataFromLine {
		this.row = br.readLine().trim();
	} this.row = br.readLine().trim() this.row this this.row br.readLine().trim() br.readLine().trim br.readLine() br.readLine br BufferedReader br br public void setDataFromLines(BufferedReader br) throws IOException {
		String line;
		while ((line = br.readLine()) != null) {
			this.rows.add(line.trim());
		}
	} setDataFromLines {
		String line;
		while ((line = br.readLine()) != null) {
			this.rows.add(line.trim());
		}
	} String line; line while ((line = br.readLine()) != null) {
			this.rows.add(line.trim());
		} (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
			this.rows.add(line.trim());
		} this.rows.add(line.trim()) this.rows.add this.rows this this.rows line.trim() line.trim line BufferedReader br br public void setValues() {

	} setValues {

	} public List<String> getRows() {
		return rows;
	} getRows {
		return rows;
	} return rows; rows public void setRows(List<String> rows) {
		this.rows = rows;
	} setRows {
		this.rows = rows;
	} this.rows = rows this.rows this this.rows rows List<String> rows rows class Processing {

	private static final String RETCODE = System.getProperty("line.separator");

	private InputData inputData;

	public Processing(InputData inputData) {
		this.inputData = inputData;
	}

	public String getResult() {
		String result = null;
		StringBuilder sb = new StringBuilder();
		for (String str : this.inputData.getRows()) {
			String[] values = str.split(InputData.SEPARATOR);
			Integer num0 = Integer.valueOf(values[0]);
			Integer num1 = Integer.valueOf(values[1]);
			if (num0 == 0 && num1 == 0) {
				break;
			}
			if (num0 > num1) {
				Integer temp = num0;
				num0 = num1;
				num1 = temp;
			}
			
			sb.append(num0);
			sb.append(InputData.SEPARATOR);
			sb.append(num1);
			sb.append(RETCODE);
		}
		result = sb.toString().trim();
		return result;
	}
} Processing private static final String RETCODE = System.getProperty("line.separator"); RETCODE System.getProperty("line.separator") System.getProperty System "line.separator" private InputData inputData; inputData public Processing(InputData inputData) {
		this.inputData = inputData;
	} Processing {
		this.inputData = inputData;
	} this.inputData = inputData this.inputData this this.inputData inputData InputData inputData inputData public String getResult() {
		String result = null;
		StringBuilder sb = new StringBuilder();
		for (String str : this.inputData.getRows()) {
			String[] values = str.split(InputData.SEPARATOR);
			Integer num0 = Integer.valueOf(values[0]);
			Integer num1 = Integer.valueOf(values[1]);
			if (num0 == 0 && num1 == 0) {
				break;
			}
			if (num0 > num1) {
				Integer temp = num0;
				num0 = num1;
				num1 = temp;
			}
			
			sb.append(num0);
			sb.append(InputData.SEPARATOR);
			sb.append(num1);
			sb.append(RETCODE);
		}
		result = sb.toString().trim();
		return result;
	} getResult {
		String result = null;
		StringBuilder sb = new StringBuilder();
		for (String str : this.inputData.getRows()) {
			String[] values = str.split(InputData.SEPARATOR);
			Integer num0 = Integer.valueOf(values[0]);
			Integer num1 = Integer.valueOf(values[1]);
			if (num0 == 0 && num1 == 0) {
				break;
			}
			if (num0 > num1) {
				Integer temp = num0;
				num0 = num1;
				num1 = temp;
			}
			
			sb.append(num0);
			sb.append(InputData.SEPARATOR);
			sb.append(num1);
			sb.append(RETCODE);
		}
		result = sb.toString().trim();
		return result;
	} String result = null; result null StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (String str : this.inputData.getRows()) {
			String[] values = str.split(InputData.SEPARATOR);
			Integer num0 = Integer.valueOf(values[0]);
			Integer num1 = Integer.valueOf(values[1]);
			if (num0 == 0 && num1 == 0) {
				break;
			}
			if (num0 > num1) {
				Integer temp = num0;
				num0 = num1;
				num1 = temp;
			}
			
			sb.append(num0);
			sb.append(InputData.SEPARATOR);
			sb.append(num1);
			sb.append(RETCODE);
		} String str this.inputData.getRows() this.inputData.getRows this.inputData this this.inputData {
			String[] values = str.split(InputData.SEPARATOR);
			Integer num0 = Integer.valueOf(values[0]);
			Integer num1 = Integer.valueOf(values[1]);
			if (num0 == 0 && num1 == 0) {
				break;
			}
			if (num0 > num1) {
				Integer temp = num0;
				num0 = num1;
				num1 = temp;
			}
			
			sb.append(num0);
			sb.append(InputData.SEPARATOR);
			sb.append(num1);
			sb.append(RETCODE);
		} {
			String[] values = str.split(InputData.SEPARATOR);
			Integer num0 = Integer.valueOf(values[0]);
			Integer num1 = Integer.valueOf(values[1]);
			if (num0 == 0 && num1 == 0) {
				break;
			}
			if (num0 > num1) {
				Integer temp = num0;
				num0 = num1;
				num1 = temp;
			}
			
			sb.append(num0);
			sb.append(InputData.SEPARATOR);
			sb.append(num1);
			sb.append(RETCODE);
		} String[] values = str.split(InputData.SEPARATOR); values str.split(InputData.SEPARATOR) str.split str InputData.SEPARATOR InputData InputData.SEPARATOR Integer num0 = Integer.valueOf(values[0]); num0 Integer.valueOf(values[0]) Integer.valueOf Integer values[0] values 0 Integer num1 = Integer.valueOf(values[1]); num1 Integer.valueOf(values[1]) Integer.valueOf Integer values[1] values 1 if (num0 == 0 && num1 == 0) {
				break;
			} num0 == 0 && num1 == 0 num0 == 0 num0 0 num1 == 0 num1 0 {
				break;
			} break; if (num0 > num1) {
				Integer temp = num0;
				num0 = num1;
				num1 = temp;
			} num0 > num1 num0 num1 {
				Integer temp = num0;
				num0 = num1;
				num1 = temp;
			} Integer temp = num0; temp num0 num0 = num1 num0 num1 num1 = temp num1 temp sb.append(num0) sb.append sb num0 sb.append(InputData.SEPARATOR) sb.append sb InputData.SEPARATOR InputData InputData.SEPARATOR sb.append(num1) sb.append sb num1 sb.append(RETCODE) sb.append sb RETCODE result = sb.toString().trim() result sb.toString().trim() sb.toString().trim sb.toString() sb.toString sb return result; result public class Main {

	/**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData();
			inputData.setDataFromLines(br);
			inputData.setValues();
			Processing processing = new Processing(inputData);
			System.out.println(processing.getResult());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	}
} public class Main {

	/**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData();
			inputData.setDataFromLines(br);
			inputData.setValues();
			Processing processing = new Processing(inputData);
			System.out.println(processing.getResult());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	}
} Main
/*
 * Aizu Online Judge
 */

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

/**
 *
 * @author yoshkur
 */
public class Main {

	/**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData();
			inputData.setDataFromLines(br);
			inputData.setValues();
			Processing processing = new Processing(inputData);
			System.out.println(processing.getResult());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	}
}

class InputData {

	public static final String SEPARATOR = " ";

	private List<String> rows = new ArrayList<>();
	private String row;

	public InputData() {
	}

	public void setDataFromLine(BufferedReader br) throws IOException {
		this.row = br.readLine().trim();
	}

	public void setDataFromLines(BufferedReader br) throws IOException {
		String line;
		while ((line = br.readLine()) != null) {
			this.rows.add(line.trim());
		}
	}

	public void setValues() {

	}

	public List<String> getRows() {
		return rows;
	}

	public void setRows(List<String> rows) {
		this.rows = rows;
	}

}

class Processing {

	private static final String RETCODE = System.getProperty("line.separator");

	private InputData inputData;

	public Processing(InputData inputData) {
		this.inputData = inputData;
	}

	public String getResult() {
		String result = null;
		StringBuilder sb = new StringBuilder();
		for (String str : this.inputData.getRows()) {
			String[] values = str.split(InputData.SEPARATOR);
			Integer num0 = Integer.valueOf(values[0]);
			Integer num1 = Integer.valueOf(values[1]);
			if (num0 == 0 && num1 == 0) {
				break;
			}
			if (num0 > num1) {
				Integer temp = num0;
				num0 = num1;
				num1 = temp;
			}
			
			sb.append(num0);
			sb.append(InputData.SEPARATOR);
			sb.append(num1);
			sb.append(RETCODE);
		}
		result = sb.toString().trim();
		return result;
	}
}