import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		int a,b,tmp;

		Scanner scan = new Scanner(System.in);

		while(true)
		{
		    a = scan.nextInt();
		    b = scan.nextInt();

		    tmp = a | b;

		    if(tmp == 0) break;

		    else if(b<a)
		    {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    }

		    System.out.println(a + " " + b);
		}

	    scan.close();

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

	public static void main(String[] args) {

		int a,b,tmp;

		Scanner scan = new Scanner(System.in);

		while(true)
		{
		    a = scan.nextInt();
		    b = scan.nextInt();

		    tmp = a | b;

		    if(tmp == 0) break;

		    else if(b<a)
		    {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    }

		    System.out.println(a + " " + b);
		}

	    scan.close();

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

		int a,b,tmp;

		Scanner scan = new Scanner(System.in);

		while(true)
		{
		    a = scan.nextInt();
		    b = scan.nextInt();

		    tmp = a | b;

		    if(tmp == 0) break;

		    else if(b<a)
		    {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    }

		    System.out.println(a + " " + b);
		}

	    scan.close();

	} main {

		int a,b,tmp;

		Scanner scan = new Scanner(System.in);

		while(true)
		{
		    a = scan.nextInt();
		    b = scan.nextInt();

		    tmp = a | b;

		    if(tmp == 0) break;

		    else if(b<a)
		    {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    }

		    System.out.println(a + " " + b);
		}

	    scan.close();

	} int a a b b tmp; tmp Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(true)
		{
		    a = scan.nextInt();
		    b = scan.nextInt();

		    tmp = a | b;

		    if(tmp == 0) break;

		    else if(b<a)
		    {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    }

		    System.out.println(a + " " + b);
		} true {
		    a = scan.nextInt();
		    b = scan.nextInt();

		    tmp = a | b;

		    if(tmp == 0) break;

		    else if(b<a)
		    {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    }

		    System.out.println(a + " " + b);
		} a = scan.nextInt() a scan.nextInt() scan.nextInt scan b = scan.nextInt() b scan.nextInt() scan.nextInt scan tmp = a | b tmp a | b a b if(tmp == 0) break;

		    else if(b<a)
		    {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    } tmp == 0 tmp 0 break; if(b<a)
		    {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    } b<a b a {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    } tmp = a tmp a a = b a b b = tmp b tmp System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {

		int a,b,tmp;

		Scanner scan = new Scanner(System.in);

		while(true)
		{
		    a = scan.nextInt();
		    b = scan.nextInt();

		    tmp = a | b;

		    if(tmp == 0) break;

		    else if(b<a)
		    {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    }

		    System.out.println(a + " " + b);
		}

	    scan.close();

	}
} public class Main {

	public static void main(String[] args) {

		int a,b,tmp;

		Scanner scan = new Scanner(System.in);

		while(true)
		{
		    a = scan.nextInt();
		    b = scan.nextInt();

		    tmp = a | b;

		    if(tmp == 0) break;

		    else if(b<a)
		    {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    }

		    System.out.println(a + " " + b);
		}

	    scan.close();

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		int a,b,tmp;

		Scanner scan = new Scanner(System.in);

		while(true)
		{
		    a = scan.nextInt();
		    b = scan.nextInt();

		    tmp = a | b;

		    if(tmp == 0) break;

		    else if(b<a)
		    {
		    	tmp = a;
		    	a = b;
		    	b = tmp;
		    }

		    System.out.println(a + " " + b);
		}

	    scan.close();

	}
}