import java.io.*;
import java.util.*;

class Main
{
    public static void main(String[] args)
    {
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();

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

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

	while(!(a == 0 && b == 0)){
	    if (a > b) {
		System.out.println(b + " " + a);
	    }
	    else {
		System.out.println(a + " " + b);
	    }
	    a = sc.nextInt();
	    b = sc.nextInt();
	}
    } main {
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();

	while(!(a == 0 && b == 0)){
	    if (a > b) {
		System.out.println(b + " " + a);
	    }
	    else {
		System.out.println(a + " " + b);
	    }
	    a = sc.nextInt();
	    b = sc.nextInt();
	}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc while(!(a == 0 && b == 0)){
	    if (a > b) {
		System.out.println(b + " " + a);
	    }
	    else {
		System.out.println(a + " " + b);
	    }
	    a = sc.nextInt();
	    b = sc.nextInt();
	} !(a == 0 && b == 0) (a == 0 && b == 0) a == 0 a 0 b == 0 b 0 {
	    if (a > b) {
		System.out.println(b + " " + a);
	    }
	    else {
		System.out.println(a + " " + b);
	    }
	    a = sc.nextInt();
	    b = sc.nextInt();
	} 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(b + " " + a) System.out.println System.out System System.out b + " " + a b + " " + a b " " a {
		System.out.println(a + " " + b);
	    } System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc String[] args args
import java.io.*;
import java.util.*;

class Main
{
    public static void main(String[] args)
    {
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();

	while(!(a == 0 && b == 0)){
	    if (a > b) {
		System.out.println(b + " " + a);
	    }
	    else {
		System.out.println(a + " " + b);
	    }
	    a = sc.nextInt();
	    b = sc.nextInt();
	}
    }
}