import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		ArrayList<String> ary = new ArrayList<String>();
		int x,y;
		int cnt = 0;
		Scanner sc = new Scanner(System.in);
//		sc.useDelimiter("\\r\\n");

		x = sc.nextInt();
		y = sc.nextInt();
		ary.add(ArrayAdder(x,y));
		cnt++;

		while(x!=0 || y!=0){
			sc.hasNext();
			x = sc.nextInt();
			y = sc.nextInt();
			ary.add(ArrayAdder(x,y));
			cnt++;
		}

		for(int i=0;i<cnt-1;i++){
			System.out.println(ary.get(i));
		}
		sc.close();
	}

	public static String ArrayAdder(int x,int y){
		String str;
		if(x > y){
			str = y +" "+ x;
		}else{
			str = x +" "+ y;
		}
		return str;
	}

} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		ArrayList<String> ary = new ArrayList<String>();
		int x,y;
		int cnt = 0;
		Scanner sc = new Scanner(System.in);
//		sc.useDelimiter("\\r\\n");

		x = sc.nextInt();
		y = sc.nextInt();
		ary.add(ArrayAdder(x,y));
		cnt++;

		while(x!=0 || y!=0){
			sc.hasNext();
			x = sc.nextInt();
			y = sc.nextInt();
			ary.add(ArrayAdder(x,y));
			cnt++;
		}

		for(int i=0;i<cnt-1;i++){
			System.out.println(ary.get(i));
		}
		sc.close();
	}

	public static String ArrayAdder(int x,int y){
		String str;
		if(x > y){
			str = y +" "+ x;
		}else{
			str = x +" "+ y;
		}
		return str;
	}

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		ArrayList<String> ary = new ArrayList<String>();
		int x,y;
		int cnt = 0;
		Scanner sc = new Scanner(System.in);
//		sc.useDelimiter("\\r\\n");

		x = sc.nextInt();
		y = sc.nextInt();
		ary.add(ArrayAdder(x,y));
		cnt++;

		while(x!=0 || y!=0){
			sc.hasNext();
			x = sc.nextInt();
			y = sc.nextInt();
			ary.add(ArrayAdder(x,y));
			cnt++;
		}

		for(int i=0;i<cnt-1;i++){
			System.out.println(ary.get(i));
		}
		sc.close();
	} main {
		// TODO ?????????????????????????????????????????????
		ArrayList<String> ary = new ArrayList<String>();
		int x,y;
		int cnt = 0;
		Scanner sc = new Scanner(System.in);
//		sc.useDelimiter("\\r\\n");

		x = sc.nextInt();
		y = sc.nextInt();
		ary.add(ArrayAdder(x,y));
		cnt++;

		while(x!=0 || y!=0){
			sc.hasNext();
			x = sc.nextInt();
			y = sc.nextInt();
			ary.add(ArrayAdder(x,y));
			cnt++;
		}

		for(int i=0;i<cnt-1;i++){
			System.out.println(ary.get(i));
		}
		sc.close();
	} ArrayList<String> ary = new ArrayList<String>(); ary new ArrayList<String>() int x x y; y int cnt = 0; cnt 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc ary.add(ArrayAdder(x,y)) ary.add ary ArrayAdder(x,y) ArrayAdder x y cnt++ cnt while(x!=0 || y!=0){
			sc.hasNext();
			x = sc.nextInt();
			y = sc.nextInt();
			ary.add(ArrayAdder(x,y));
			cnt++;
		} x!=0 || y!=0 x!=0 x 0 y!=0 y 0 {
			sc.hasNext();
			x = sc.nextInt();
			y = sc.nextInt();
			ary.add(ArrayAdder(x,y));
			cnt++;
		} sc.hasNext() sc.hasNext sc x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc ary.add(ArrayAdder(x,y)) ary.add ary ArrayAdder(x,y) ArrayAdder x y cnt++ cnt for(int i=0;i<cnt-1;i++){
			System.out.println(ary.get(i));
		} int i=0; int i=0; i 0 i<cnt-1 i cnt-1 cnt 1 i++ i++ i {
			System.out.println(ary.get(i));
		} {
			System.out.println(ary.get(i));
		} System.out.println(ary.get(i)) System.out.println System.out System System.out ary.get(i) ary.get ary i sc.close() sc.close sc String[] args args public static String ArrayAdder(int x,int y){
		String str;
		if(x > y){
			str = y +" "+ x;
		}else{
			str = x +" "+ y;
		}
		return str;
	} ArrayAdder {
		String str;
		if(x > y){
			str = y +" "+ x;
		}else{
			str = x +" "+ y;
		}
		return str;
	} String str; str if(x > y){
			str = y +" "+ x;
		}else{
			str = x +" "+ y;
		} x > y x y {
			str = y +" "+ x;
		} str = y +" "+ x str y +" "+ x y +" "+ x y " " x {
			str = x +" "+ y;
		} str = x +" "+ y str x +" "+ y x +" "+ y x " " y return str; str int x x int y y public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		ArrayList<String> ary = new ArrayList<String>();
		int x,y;
		int cnt = 0;
		Scanner sc = new Scanner(System.in);
//		sc.useDelimiter("\\r\\n");

		x = sc.nextInt();
		y = sc.nextInt();
		ary.add(ArrayAdder(x,y));
		cnt++;

		while(x!=0 || y!=0){
			sc.hasNext();
			x = sc.nextInt();
			y = sc.nextInt();
			ary.add(ArrayAdder(x,y));
			cnt++;
		}

		for(int i=0;i<cnt-1;i++){
			System.out.println(ary.get(i));
		}
		sc.close();
	}

	public static String ArrayAdder(int x,int y){
		String str;
		if(x > y){
			str = y +" "+ x;
		}else{
			str = x +" "+ y;
		}
		return str;
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		ArrayList<String> ary = new ArrayList<String>();
		int x,y;
		int cnt = 0;
		Scanner sc = new Scanner(System.in);
//		sc.useDelimiter("\\r\\n");

		x = sc.nextInt();
		y = sc.nextInt();
		ary.add(ArrayAdder(x,y));
		cnt++;

		while(x!=0 || y!=0){
			sc.hasNext();
			x = sc.nextInt();
			y = sc.nextInt();
			ary.add(ArrayAdder(x,y));
			cnt++;
		}

		for(int i=0;i<cnt-1;i++){
			System.out.println(ary.get(i));
		}
		sc.close();
	}

	public static String ArrayAdder(int x,int y){
		String str;
		if(x > y){
			str = y +" "+ x;
		}else{
			str = x +" "+ y;
		}
		return str;
	}

} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		ArrayList<String> ary = new ArrayList<String>();
		int x,y;
		int cnt = 0;
		Scanner sc = new Scanner(System.in);
//		sc.useDelimiter("\\r\\n");

		x = sc.nextInt();
		y = sc.nextInt();
		ary.add(ArrayAdder(x,y));
		cnt++;

		while(x!=0 || y!=0){
			sc.hasNext();
			x = sc.nextInt();
			y = sc.nextInt();
			ary.add(ArrayAdder(x,y));
			cnt++;
		}

		for(int i=0;i<cnt-1;i++){
			System.out.println(ary.get(i));
		}
		sc.close();
	}

	public static String ArrayAdder(int x,int y){
		String str;
		if(x > y){
			str = y +" "+ x;
		}else{
			str = x +" "+ y;
		}
		return str;
	}

}