import java.util.Scanner;
import java.io.*;


class Main {
	public static void main(String args[]) {
	    Scanner sc = new Scanner(System.in);
	    while( true ){
	    	String s1 = sc.next();
	    	int x = Integer.parseInt(s1);
	    	String s2 = sc.next();
	    	int y = Integer.parseInt(s2);
	    	if( x == 0 && y == 0){
	    		break;
	    	}
	    	if( x < y ){
	    	    System.out.println( x + " " + y );
	    	}
	    	else{
	    		System.out.println( y + " " + x );
	    	}
	    }
	}
} import java.util.Scanner; Scanner java.util import java.io.*; io.* java class Main {
	public static void main(String args[]) {
	    Scanner sc = new Scanner(System.in);
	    while( true ){
	    	String s1 = sc.next();
	    	int x = Integer.parseInt(s1);
	    	String s2 = sc.next();
	    	int y = Integer.parseInt(s2);
	    	if( x == 0 && y == 0){
	    		break;
	    	}
	    	if( x < y ){
	    	    System.out.println( x + " " + y );
	    	}
	    	else{
	    		System.out.println( y + " " + x );
	    	}
	    }
	}
} Main public static void main(String args[]) {
	    Scanner sc = new Scanner(System.in);
	    while( true ){
	    	String s1 = sc.next();
	    	int x = Integer.parseInt(s1);
	    	String s2 = sc.next();
	    	int y = Integer.parseInt(s2);
	    	if( x == 0 && y == 0){
	    		break;
	    	}
	    	if( x < y ){
	    	    System.out.println( x + " " + y );
	    	}
	    	else{
	    		System.out.println( y + " " + x );
	    	}
	    }
	} main {
	    Scanner sc = new Scanner(System.in);
	    while( true ){
	    	String s1 = sc.next();
	    	int x = Integer.parseInt(s1);
	    	String s2 = sc.next();
	    	int y = Integer.parseInt(s2);
	    	if( x == 0 && y == 0){
	    		break;
	    	}
	    	if( x < y ){
	    	    System.out.println( x + " " + y );
	    	}
	    	else{
	    		System.out.println( y + " " + x );
	    	}
	    }
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while( true ){
	    	String s1 = sc.next();
	    	int x = Integer.parseInt(s1);
	    	String s2 = sc.next();
	    	int y = Integer.parseInt(s2);
	    	if( x == 0 && y == 0){
	    		break;
	    	}
	    	if( x < y ){
	    	    System.out.println( x + " " + y );
	    	}
	    	else{
	    		System.out.println( y + " " + x );
	    	}
	    } true {
	    	String s1 = sc.next();
	    	int x = Integer.parseInt(s1);
	    	String s2 = sc.next();
	    	int y = Integer.parseInt(s2);
	    	if( x == 0 && y == 0){
	    		break;
	    	}
	    	if( x < y ){
	    	    System.out.println( x + " " + y );
	    	}
	    	else{
	    		System.out.println( y + " " + x );
	    	}
	    } String s1 = sc.next(); s1 sc.next() sc.next sc int x = Integer.parseInt(s1); x Integer.parseInt(s1) Integer.parseInt Integer s1 String s2 = sc.next(); s2 sc.next() sc.next sc int y = Integer.parseInt(s2); y Integer.parseInt(s2) Integer.parseInt Integer s2 if( x == 0 && y == 0){
	    		break;
	    	} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
	    		break;
	    	} break; if( x < y ){
	    	    System.out.println( x + " " + y );
	    	}
	    	else{
	    		System.out.println( y + " " + x );
	    	} x < y x y {
	    	    System.out.println( x + " " + y );
	    	} System.out.println( x + " " + y ) System.out.println System.out System System.out x + " " + y x + " " + y x " " y {
	    		System.out.println( y + " " + x );
	    	} System.out.println( y + " " + x ) System.out.println System.out System System.out y + " " + x y + " " + x y " " x String args[] args
import java.util.Scanner;
import java.io.*;


class Main {
	public static void main(String args[]) {
	    Scanner sc = new Scanner(System.in);
	    while( true ){
	    	String s1 = sc.next();
	    	int x = Integer.parseInt(s1);
	    	String s2 = sc.next();
	    	int y = Integer.parseInt(s2);
	    	if( x == 0 && y == 0){
	    		break;
	    	}
	    	if( x < y ){
	    	    System.out.println( x + " " + y );
	    	}
	    	else{
	    		System.out.println( y + " " + x );
	    	}
	    }
	}
}