import java.util.Scanner;
public class Main
{
	public static void main(String args[])
	{
		int a, b;
		Scanner inp = new Scanner(System.in);
		while( true )
		{
			a = inp.nextInt();
			b = inp.nextInt();
			if(a == 0 && b == 0)
				break;
			else {
				if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b);
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String args[])
	{
		int a, b;
		Scanner inp = new Scanner(System.in);
		while( true )
		{
			a = inp.nextInt();
			b = inp.nextInt();
			if(a == 0 && b == 0)
				break;
			else {
				if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b);
			}
		}
	}
} Main public static void main(String args[])
	{
		int a, b;
		Scanner inp = new Scanner(System.in);
		while( true )
		{
			a = inp.nextInt();
			b = inp.nextInt();
			if(a == 0 && b == 0)
				break;
			else {
				if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b);
			}
		}
	} main {
		int a, b;
		Scanner inp = new Scanner(System.in);
		while( true )
		{
			a = inp.nextInt();
			b = inp.nextInt();
			if(a == 0 && b == 0)
				break;
			else {
				if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b);
			}
		}
	} int a a b; b Scanner inp = new Scanner(System.in); inp new Scanner(System.in) while( true )
		{
			a = inp.nextInt();
			b = inp.nextInt();
			if(a == 0 && b == 0)
				break;
			else {
				if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b);
			}
		} true {
			a = inp.nextInt();
			b = inp.nextInt();
			if(a == 0 && b == 0)
				break;
			else {
				if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b);
			}
		} a = inp.nextInt() a inp.nextInt() inp.nextInt inp b = inp.nextInt() b inp.nextInt() inp.nextInt inp if(a == 0 && b == 0)
				break;
			else {
				if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b);
			} a == 0 && b == 0 a == 0 a 0 b == 0 b 0 break; {
				if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b);
			} if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b); a > b a b System.out.println(b + " " + a) System.out.println System.out System System.out b + " " + a b + " " + a b " " a 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[])
	{
		int a, b;
		Scanner inp = new Scanner(System.in);
		while( true )
		{
			a = inp.nextInt();
			b = inp.nextInt();
			if(a == 0 && b == 0)
				break;
			else {
				if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b);
			}
		}
	}
} public class Main
{
	public static void main(String args[])
	{
		int a, b;
		Scanner inp = new Scanner(System.in);
		while( true )
		{
			a = inp.nextInt();
			b = inp.nextInt();
			if(a == 0 && b == 0)
				break;
			else {
				if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b);
			}
		}
	}
} Main
import java.util.Scanner;
public class Main
{
	public static void main(String args[])
	{
		int a, b;
		Scanner inp = new Scanner(System.in);
		while( true )
		{
			a = inp.nextInt();
			b = inp.nextInt();
			if(a == 0 && b == 0)
				break;
			else {
				if(a > b)
					System.out.println(b + " " + a);
				else
					System.out.println(a + " " + b);
			}
		}
	}
}