import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		int x,y;

		while ( 0 != ( x = sc.nextInt() ) | 0 != ( y = sc.nextInt() ) ) {
			if ( x < y )
				sb.append( x + " " + y + "\n" );
			else
				sb.append( y + " " + x + "\n" );
		}

		System.out.print(sb);
	}

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

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		int x,y;

		while ( 0 != ( x = sc.nextInt() ) | 0 != ( y = sc.nextInt() ) ) {
			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) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		int x,y;

		while ( 0 != ( x = sc.nextInt() ) | 0 != ( y = sc.nextInt() ) ) {
			if ( x < y )
				sb.append( x + " " + y + "\n" );
			else
				sb.append( y + " " + x + "\n" );
		}

		System.out.print(sb);
	} main {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		int x,y;

		while ( 0 != ( x = sc.nextInt() ) | 0 != ( y = sc.nextInt() ) ) {
			if ( x < y )
				sb.append( x + " " + y + "\n" );
			else
				sb.append( y + " " + x + "\n" );
		}

		System.out.print(sb);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int x x y; y while ( 0 != ( x = sc.nextInt() ) | 0 != ( y = sc.nextInt() ) ) {
			if ( x < y )
				sb.append( x + " " + y + "\n" );
			else
				sb.append( y + " " + x + "\n" );
		} 0 != ( x = sc.nextInt() ) | 0 != ( y = sc.nextInt() ) 0 != ( x = sc.nextInt() ) 0 ( x = sc.nextInt() ) x sc.nextInt() sc.nextInt sc 0 != ( y = sc.nextInt() ) 0 ( y = sc.nextInt() ) y sc.nextInt() sc.nextInt sc {
			if ( x < y )
				sb.append( x + " " + y + "\n" );
			else
				sb.append( y + " " + x + "\n" );
		} 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 sb x + " " + y + "\n" y x + " " + y + "\n" x " " y "\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 public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		int x,y;

		while ( 0 != ( x = sc.nextInt() ) | 0 != ( y = sc.nextInt() ) ) {
			if ( x < y )
				sb.append( x + " " + y + "\n" );
			else
				sb.append( y + " " + x + "\n" );
		}

		System.out.print(sb);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		int x,y;

		while ( 0 != ( x = sc.nextInt() ) | 0 != ( y = sc.nextInt() ) ) {
			if ( x < y )
				sb.append( x + " " + y + "\n" );
			else
				sb.append( y + " " + x + "\n" );
		}

		System.out.print(sb);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		int x,y;

		while ( 0 != ( x = sc.nextInt() ) | 0 != ( y = sc.nextInt() ) ) {
			if ( x < y )
				sb.append( x + " " + y + "\n" );
			else
				sb.append( y + " " + x + "\n" );
		}

		System.out.print(sb);
	}

}