
import java.util.Scanner;
public class Main{


	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);
		
		int a,b;
		a=sc.nextInt();
		b=sc.nextInt();
		
		while(a!=0 || b!=0){
			
			System.out.println(b>a?a+" " +b:b+" "+a);
			a=sc.nextInt();
			b=sc.nextInt();
		}
		
	}

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


	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);
		
		int a,b;
		a=sc.nextInt();
		b=sc.nextInt();
		
		while(a!=0 || b!=0){
			
			System.out.println(b>a?a+" " +b:b+" "+a);
			a=sc.nextInt();
			b=sc.nextInt();
		}
		
	}

} Main public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);
		
		int a,b;
		a=sc.nextInt();
		b=sc.nextInt();
		
		while(a!=0 || b!=0){
			
			System.out.println(b>a?a+" " +b:b+" "+a);
			a=sc.nextInt();
			b=sc.nextInt();
		}
		
	} main {

		Scanner sc=new Scanner(System.in);
		
		int a,b;
		a=sc.nextInt();
		b=sc.nextInt();
		
		while(a!=0 || b!=0){
			
			System.out.println(b>a?a+" " +b:b+" "+a);
			a=sc.nextInt();
			b=sc.nextInt();
		}
		
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int a a b; b a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc while(a!=0 || b!=0){
			
			System.out.println(b>a?a+" " +b:b+" "+a);
			a=sc.nextInt();
			b=sc.nextInt();
		} a!=0 || b!=0 a!=0 a 0 b!=0 b 0 {
			
			System.out.println(b>a?a+" " +b:b+" "+a);
			a=sc.nextInt();
			b=sc.nextInt();
		} System.out.println(b>a?a+" " +b:b+" "+a) System.out.println System.out System System.out b>a?a+" " +b:b+" "+a b>a b a a+" " +b a+" " +b a " " b b+" "+a b+" "+a b " " a a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc String[] args args public class Main{


	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);
		
		int a,b;
		a=sc.nextInt();
		b=sc.nextInt();
		
		while(a!=0 || b!=0){
			
			System.out.println(b>a?a+" " +b:b+" "+a);
			a=sc.nextInt();
			b=sc.nextInt();
		}
		
	}

} public class Main{


	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);
		
		int a,b;
		a=sc.nextInt();
		b=sc.nextInt();
		
		while(a!=0 || b!=0){
			
			System.out.println(b>a?a+" " +b:b+" "+a);
			a=sc.nextInt();
			b=sc.nextInt();
		}
		
	}

} Main

import java.util.Scanner;
public class Main{


	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);
		
		int a,b;
		a=sc.nextInt();
		b=sc.nextInt();
		
		while(a!=0 || b!=0){
			
			System.out.println(b>a?a+" " +b:b+" "+a);
			a=sc.nextInt();
			b=sc.nextInt();
		}
		
	}

}