import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		for(int i=1;; i++)
		{		
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			
			if(a==0 && b==0)
			{
				break;
			}
			else if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			}
			System.out.println(a+" "+b);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		for(int i=1;; i++)
		{		
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			
			if(a==0 && b==0)
			{
				break;
			}
			else if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			}
			System.out.println(a+" "+b);
		}
	}
} Main public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		for(int i=1;; i++)
		{		
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			
			if(a==0 && b==0)
			{
				break;
			}
			else if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			}
			System.out.println(a+" "+b);
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		for(int i=1;; i++)
		{		
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			
			if(a==0 && b==0)
			{
				break;
			}
			else if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			}
			System.out.println(a+" "+b);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) for(int i=1;; i++)
		{		
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			
			if(a==0 && b==0)
			{
				break;
			}
			else if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			}
			System.out.println(a+" "+b);
		} int i=1; int i=1; i 1 i++ i++ i {		
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			
			if(a==0 && b==0)
			{
				break;
			}
			else if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			}
			System.out.println(a+" "+b);
		} {		
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			
			if(a==0 && b==0)
			{
				break;
			}
			else if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			}
			System.out.println(a+" "+b);
		} int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner if(a==0 && b==0)
			{
				break;
			}
			else if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			} a==0 && b==0 a==0 a 0 b==0 b 0 {
				break;
			} break; if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			} a > b a b {
				int buf = a;
				a = b;
				b = buf;
				
			} int buf = a; buf a a = b a b b = buf b buf System.out.println(a+" "+b) System.out.println System.out System System.out a+" "+b a+" "+b a " " b String[] args args public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		for(int i=1;; i++)
		{		
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			
			if(a==0 && b==0)
			{
				break;
			}
			else if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			}
			System.out.println(a+" "+b);
		}
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		for(int i=1;; i++)
		{		
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			
			if(a==0 && b==0)
			{
				break;
			}
			else if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			}
			System.out.println(a+" "+b);
		}
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		for(int i=1;; i++)
		{		
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			
			if(a==0 && b==0)
			{
				break;
			}
			else if(a > b)
			{
				int buf = a;
				a = b;
				b = buf;
				
			}
			System.out.println(a+" "+b);
		}
	}
}