import java.util.Scanner;

public class Main
{

	public static void main(String[] args)
	{
		Scanner in=new Scanner(System.in);
		int a,b;
		a=in.nextInt();
		b=in.nextInt();
		while(!(a==0&&b==0) )
		{
			if(a>b)
			{int temp=a;
			a=b;
			b=temp;
			}
			System.out.println(a + " " + b);
			
			a=in.nextInt();
			b=in.nextInt();
			
			
		}
		
	}
} import java.util.Scanner; Scanner java.util public class Main
{

	public static void main(String[] args)
	{
		Scanner in=new Scanner(System.in);
		int a,b;
		a=in.nextInt();
		b=in.nextInt();
		while(!(a==0&&b==0) )
		{
			if(a>b)
			{int temp=a;
			a=b;
			b=temp;
			}
			System.out.println(a + " " + b);
			
			a=in.nextInt();
			b=in.nextInt();
			
			
		}
		
	}
} Main public static void main(String[] args)
	{
		Scanner in=new Scanner(System.in);
		int a,b;
		a=in.nextInt();
		b=in.nextInt();
		while(!(a==0&&b==0) )
		{
			if(a>b)
			{int temp=a;
			a=b;
			b=temp;
			}
			System.out.println(a + " " + b);
			
			a=in.nextInt();
			b=in.nextInt();
			
			
		}
		
	} main {
		Scanner in=new Scanner(System.in);
		int a,b;
		a=in.nextInt();
		b=in.nextInt();
		while(!(a==0&&b==0) )
		{
			if(a>b)
			{int temp=a;
			a=b;
			b=temp;
			}
			System.out.println(a + " " + b);
			
			a=in.nextInt();
			b=in.nextInt();
			
			
		}
		
	} Scanner in=new Scanner(System.in); in new Scanner(System.in) int a a b; b a=in.nextInt() a in.nextInt() in.nextInt in b=in.nextInt() b in.nextInt() in.nextInt in while(!(a==0&&b==0) )
		{
			if(a>b)
			{int temp=a;
			a=b;
			b=temp;
			}
			System.out.println(a + " " + b);
			
			a=in.nextInt();
			b=in.nextInt();
			
			
		} !(a==0&&b==0) (a==0&&b==0) a==0 a 0 b==0 b 0 {
			if(a>b)
			{int temp=a;
			a=b;
			b=temp;
			}
			System.out.println(a + " " + b);
			
			a=in.nextInt();
			b=in.nextInt();
			
			
		} if(a>b)
			{int temp=a;
			a=b;
			b=temp;
			} a>b a b {int temp=a;
			a=b;
			b=temp;
			} int temp=a; temp a a=b a b b=temp b temp System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b a=in.nextInt() a in.nextInt() in.nextInt in b=in.nextInt() b in.nextInt() in.nextInt in String[] args args public class Main
{

	public static void main(String[] args)
	{
		Scanner in=new Scanner(System.in);
		int a,b;
		a=in.nextInt();
		b=in.nextInt();
		while(!(a==0&&b==0) )
		{
			if(a>b)
			{int temp=a;
			a=b;
			b=temp;
			}
			System.out.println(a + " " + b);
			
			a=in.nextInt();
			b=in.nextInt();
			
			
		}
		
	}
} public class Main
{

	public static void main(String[] args)
	{
		Scanner in=new Scanner(System.in);
		int a,b;
		a=in.nextInt();
		b=in.nextInt();
		while(!(a==0&&b==0) )
		{
			if(a>b)
			{int temp=a;
			a=b;
			b=temp;
			}
			System.out.println(a + " " + b);
			
			a=in.nextInt();
			b=in.nextInt();
			
			
		}
		
	}
} Main
import java.util.Scanner;

public class Main
{

	public static void main(String[] args)
	{
		Scanner in=new Scanner(System.in);
		int a,b;
		a=in.nextInt();
		b=in.nextInt();
		while(!(a==0&&b==0) )
		{
			if(a>b)
			{int temp=a;
			a=b;
			b=temp;
			}
			System.out.println(a + " " + b);
			
			a=in.nextInt();
			b=in.nextInt();
			
			
		}
		
	}
}