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

public class Main {

	public static void main(String[] args) throws IOException{
		int box;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
		String[] inputNum = br.readLine().split(" ");
		int x = Integer.parseInt(inputNum[0]);
		int y = Integer.parseInt(inputNum[1]);

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

		if(x > y){
			box = x;
			x = y;
			y = box;
		}

		System.out.println(x + " " + y);

		}


	}

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

	public static void main(String[] args) throws IOException{
		int box;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
		String[] inputNum = br.readLine().split(" ");
		int x = Integer.parseInt(inputNum[0]);
		int y = Integer.parseInt(inputNum[1]);

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

		if(x > y){
			box = x;
			x = y;
			y = box;
		}

		System.out.println(x + " " + y);

		}


	}

} Main public static void main(String[] args) throws IOException{
		int box;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
		String[] inputNum = br.readLine().split(" ");
		int x = Integer.parseInt(inputNum[0]);
		int y = Integer.parseInt(inputNum[1]);

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

		if(x > y){
			box = x;
			x = y;
			y = box;
		}

		System.out.println(x + " " + y);

		}


	} main {
		int box;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
		String[] inputNum = br.readLine().split(" ");
		int x = Integer.parseInt(inputNum[0]);
		int y = Integer.parseInt(inputNum[1]);

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

		if(x > y){
			box = x;
			x = y;
			y = box;
		}

		System.out.println(x + " " + y);

		}


	} int box; box BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
		String[] inputNum = br.readLine().split(" ");
		int x = Integer.parseInt(inputNum[0]);
		int y = Integer.parseInt(inputNum[1]);

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

		if(x > y){
			box = x;
			x = y;
			y = box;
		}

		System.out.println(x + " " + y);

		} true {
		String[] inputNum = br.readLine().split(" ");
		int x = Integer.parseInt(inputNum[0]);
		int y = Integer.parseInt(inputNum[1]);

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

		if(x > y){
			box = x;
			x = y;
			y = box;
		}

		System.out.println(x + " " + y);

		} String[] inputNum = br.readLine().split(" "); inputNum br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int x = Integer.parseInt(inputNum[0]); x Integer.parseInt(inputNum[0]) Integer.parseInt Integer inputNum[0] inputNum 0 int y = Integer.parseInt(inputNum[1]); y Integer.parseInt(inputNum[1]) Integer.parseInt Integer inputNum[1] inputNum 1 if (x == 0 && y == 0) {
			break;
		} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
			break;
		} break; if(x > y){
			box = x;
			x = y;
			y = box;
		} x > y x y {
			box = x;
			x = y;
			y = box;
		} box = x box x x = y x y y = box y box System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y String[] args args public class Main {

	public static void main(String[] args) throws IOException{
		int box;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
		String[] inputNum = br.readLine().split(" ");
		int x = Integer.parseInt(inputNum[0]);
		int y = Integer.parseInt(inputNum[1]);

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

		if(x > y){
			box = x;
			x = y;
			y = box;
		}

		System.out.println(x + " " + y);

		}


	}

} public class Main {

	public static void main(String[] args) throws IOException{
		int box;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
		String[] inputNum = br.readLine().split(" ");
		int x = Integer.parseInt(inputNum[0]);
		int y = Integer.parseInt(inputNum[1]);

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

		if(x > y){
			box = x;
			x = y;
			y = box;
		}

		System.out.println(x + " " + y);

		}


	}

} Main

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

public class Main {

	public static void main(String[] args) throws IOException{
		int box;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
		String[] inputNum = br.readLine().split(" ");
		int x = Integer.parseInt(inputNum[0]);
		int y = Integer.parseInt(inputNum[1]);

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

		if(x > y){
			box = x;
			x = y;
			y = box;
		}

		System.out.println(x + " " + y);

		}


	}

}