import java.util.Scanner;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class Main {
	public static void main( String[] args ) {
		int[] intAry = new int[2];
		Scanner sc = new Scanner( System.in ) ;
		String s = sc.nextLine() ;
		scanInt( s, intAry ) ;
		while( intAry[0] != 0 || intAry[1] != 0 ) {
			if ( intAry[0] > intAry[1] ) {
				System.out.println( intAry[1] + " " + intAry[0] ) ;
			} else {
				System.out.println( intAry[0] + " " + intAry[1] ) ;
			}
			s = sc.nextLine();
			scanInt( s, intAry ) ;
		}
	}
	public static void scanInt( String str, int[] intAry ) {
		Pattern ptn = Pattern.compile( "([0-9]+)\\s+([0-9]+)");
		Matcher mch = ptn.matcher( str ) ;
		if ( mch.find() == true ) {
			intAry[0] = Integer.parseInt( mch.group(1) ) ;
			intAry[1] = Integer.parseInt( mch.group(2) ) ;
		}
	}
} import java.util.Scanner; Scanner java.util import java.util.regex.Pattern; Pattern java.util.regex import java.util.regex.Matcher; Matcher java.util.regex public class Main {
	public static void main( String[] args ) {
		int[] intAry = new int[2];
		Scanner sc = new Scanner( System.in ) ;
		String s = sc.nextLine() ;
		scanInt( s, intAry ) ;
		while( intAry[0] != 0 || intAry[1] != 0 ) {
			if ( intAry[0] > intAry[1] ) {
				System.out.println( intAry[1] + " " + intAry[0] ) ;
			} else {
				System.out.println( intAry[0] + " " + intAry[1] ) ;
			}
			s = sc.nextLine();
			scanInt( s, intAry ) ;
		}
	}
	public static void scanInt( String str, int[] intAry ) {
		Pattern ptn = Pattern.compile( "([0-9]+)\\s+([0-9]+)");
		Matcher mch = ptn.matcher( str ) ;
		if ( mch.find() == true ) {
			intAry[0] = Integer.parseInt( mch.group(1) ) ;
			intAry[1] = Integer.parseInt( mch.group(2) ) ;
		}
	}
} Main public static void main( String[] args ) {
		int[] intAry = new int[2];
		Scanner sc = new Scanner( System.in ) ;
		String s = sc.nextLine() ;
		scanInt( s, intAry ) ;
		while( intAry[0] != 0 || intAry[1] != 0 ) {
			if ( intAry[0] > intAry[1] ) {
				System.out.println( intAry[1] + " " + intAry[0] ) ;
			} else {
				System.out.println( intAry[0] + " " + intAry[1] ) ;
			}
			s = sc.nextLine();
			scanInt( s, intAry ) ;
		}
	} main {
		int[] intAry = new int[2];
		Scanner sc = new Scanner( System.in ) ;
		String s = sc.nextLine() ;
		scanInt( s, intAry ) ;
		while( intAry[0] != 0 || intAry[1] != 0 ) {
			if ( intAry[0] > intAry[1] ) {
				System.out.println( intAry[1] + " " + intAry[0] ) ;
			} else {
				System.out.println( intAry[0] + " " + intAry[1] ) ;
			}
			s = sc.nextLine();
			scanInt( s, intAry ) ;
		}
	} int[] intAry = new int[2]; intAry new int[2] 2 Scanner sc = new Scanner( System.in ) ; sc new Scanner( System.in ) String s = sc.nextLine() ; s sc.nextLine() sc.nextLine sc scanInt( s, intAry ) scanInt s intAry while( intAry[0] != 0 || intAry[1] != 0 ) {
			if ( intAry[0] > intAry[1] ) {
				System.out.println( intAry[1] + " " + intAry[0] ) ;
			} else {
				System.out.println( intAry[0] + " " + intAry[1] ) ;
			}
			s = sc.nextLine();
			scanInt( s, intAry ) ;
		} intAry[0] != 0 || intAry[1] != 0 intAry[0] != 0 intAry[0] intAry 0 0 intAry[1] != 0 intAry[1] intAry 1 0 {
			if ( intAry[0] > intAry[1] ) {
				System.out.println( intAry[1] + " " + intAry[0] ) ;
			} else {
				System.out.println( intAry[0] + " " + intAry[1] ) ;
			}
			s = sc.nextLine();
			scanInt( s, intAry ) ;
		} if ( intAry[0] > intAry[1] ) {
				System.out.println( intAry[1] + " " + intAry[0] ) ;
			} else {
				System.out.println( intAry[0] + " " + intAry[1] ) ;
			} intAry[0] > intAry[1] intAry[0] intAry 0 intAry[1] intAry 1 {
				System.out.println( intAry[1] + " " + intAry[0] ) ;
			} System.out.println( intAry[1] + " " + intAry[0] ) System.out.println System.out System System.out intAry[1] + " " + intAry[0] intAry[1] + " " + intAry[0] intAry[1] intAry 1 " " intAry[0] intAry 0 {
				System.out.println( intAry[0] + " " + intAry[1] ) ;
			} System.out.println( intAry[0] + " " + intAry[1] ) System.out.println System.out System System.out intAry[0] + " " + intAry[1] intAry[0] + " " + intAry[1] intAry[0] intAry 0 " " intAry[1] intAry 1 s = sc.nextLine() s sc.nextLine() sc.nextLine sc scanInt( s, intAry ) scanInt s intAry String[] args args public static void scanInt( String str, int[] intAry ) {
		Pattern ptn = Pattern.compile( "([0-9]+)\\s+([0-9]+)");
		Matcher mch = ptn.matcher( str ) ;
		if ( mch.find() == true ) {
			intAry[0] = Integer.parseInt( mch.group(1) ) ;
			intAry[1] = Integer.parseInt( mch.group(2) ) ;
		}
	} scanInt {
		Pattern ptn = Pattern.compile( "([0-9]+)\\s+([0-9]+)");
		Matcher mch = ptn.matcher( str ) ;
		if ( mch.find() == true ) {
			intAry[0] = Integer.parseInt( mch.group(1) ) ;
			intAry[1] = Integer.parseInt( mch.group(2) ) ;
		}
	} Pattern ptn = Pattern.compile( "([0-9]+)\\s+([0-9]+)"); ptn Pattern.compile( "([0-9]+)\\s+([0-9]+)") Pattern.compile Pattern "([0-9]+)\\s+([0-9]+)" Matcher mch = ptn.matcher( str ) ; mch ptn.matcher( str ) ptn.matcher ptn str if ( mch.find() == true ) {
			intAry[0] = Integer.parseInt( mch.group(1) ) ;
			intAry[1] = Integer.parseInt( mch.group(2) ) ;
		} mch.find() == true mch.find() mch.find mch true {
			intAry[0] = Integer.parseInt( mch.group(1) ) ;
			intAry[1] = Integer.parseInt( mch.group(2) ) ;
		} intAry[0] = Integer.parseInt( mch.group(1) ) intAry[0] intAry 0 Integer.parseInt( mch.group(1) ) Integer.parseInt Integer mch.group(1) mch.group mch 1 intAry[1] = Integer.parseInt( mch.group(2) ) intAry[1] intAry 1 Integer.parseInt( mch.group(2) ) Integer.parseInt Integer mch.group(2) mch.group mch 2 String str str int[] intAry intAry public class Main {
	public static void main( String[] args ) {
		int[] intAry = new int[2];
		Scanner sc = new Scanner( System.in ) ;
		String s = sc.nextLine() ;
		scanInt( s, intAry ) ;
		while( intAry[0] != 0 || intAry[1] != 0 ) {
			if ( intAry[0] > intAry[1] ) {
				System.out.println( intAry[1] + " " + intAry[0] ) ;
			} else {
				System.out.println( intAry[0] + " " + intAry[1] ) ;
			}
			s = sc.nextLine();
			scanInt( s, intAry ) ;
		}
	}
	public static void scanInt( String str, int[] intAry ) {
		Pattern ptn = Pattern.compile( "([0-9]+)\\s+([0-9]+)");
		Matcher mch = ptn.matcher( str ) ;
		if ( mch.find() == true ) {
			intAry[0] = Integer.parseInt( mch.group(1) ) ;
			intAry[1] = Integer.parseInt( mch.group(2) ) ;
		}
	}
} public class Main {
	public static void main( String[] args ) {
		int[] intAry = new int[2];
		Scanner sc = new Scanner( System.in ) ;
		String s = sc.nextLine() ;
		scanInt( s, intAry ) ;
		while( intAry[0] != 0 || intAry[1] != 0 ) {
			if ( intAry[0] > intAry[1] ) {
				System.out.println( intAry[1] + " " + intAry[0] ) ;
			} else {
				System.out.println( intAry[0] + " " + intAry[1] ) ;
			}
			s = sc.nextLine();
			scanInt( s, intAry ) ;
		}
	}
	public static void scanInt( String str, int[] intAry ) {
		Pattern ptn = Pattern.compile( "([0-9]+)\\s+([0-9]+)");
		Matcher mch = ptn.matcher( str ) ;
		if ( mch.find() == true ) {
			intAry[0] = Integer.parseInt( mch.group(1) ) ;
			intAry[1] = Integer.parseInt( mch.group(2) ) ;
		}
	}
} Main
import java.util.Scanner;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class Main {
	public static void main( String[] args ) {
		int[] intAry = new int[2];
		Scanner sc = new Scanner( System.in ) ;
		String s = sc.nextLine() ;
		scanInt( s, intAry ) ;
		while( intAry[0] != 0 || intAry[1] != 0 ) {
			if ( intAry[0] > intAry[1] ) {
				System.out.println( intAry[1] + " " + intAry[0] ) ;
			} else {
				System.out.println( intAry[0] + " " + intAry[1] ) ;
			}
			s = sc.nextLine();
			scanInt( s, intAry ) ;
		}
	}
	public static void scanInt( String str, int[] intAry ) {
		Pattern ptn = Pattern.compile( "([0-9]+)\\s+([0-9]+)");
		Matcher mch = ptn.matcher( str ) ;
		if ( mch.find() == true ) {
			intAry[0] = Integer.parseInt( mch.group(1) ) ;
			intAry[1] = Integer.parseInt( mch.group(2) ) ;
		}
	}
}