import java.util.*;
class Main{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args) {
		int in1,in2;
		while(true) {
			in1 = Integer.parseInt(s.next());
			in2 = Integer.parseInt(s.next());
			if((in1|in2)==0)
				return;
			if(in1<=in2)
				System.out.printf("%d %d\n",in1,in2);
			else
				System.out.printf("%d %d\n",in2,in1);
		}
	}
} import java.util.*; util.* java class Main{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args) {
		int in1,in2;
		while(true) {
			in1 = Integer.parseInt(s.next());
			in2 = Integer.parseInt(s.next());
			if((in1|in2)==0)
				return;
			if(in1<=in2)
				System.out.printf("%d %d\n",in1,in2);
			else
				System.out.printf("%d %d\n",in2,in1);
		}
	}
} Main static Scanner s = new Scanner(System.in); s new Scanner(System.in) public static void main(String[] args) {
		int in1,in2;
		while(true) {
			in1 = Integer.parseInt(s.next());
			in2 = Integer.parseInt(s.next());
			if((in1|in2)==0)
				return;
			if(in1<=in2)
				System.out.printf("%d %d\n",in1,in2);
			else
				System.out.printf("%d %d\n",in2,in1);
		}
	} main {
		int in1,in2;
		while(true) {
			in1 = Integer.parseInt(s.next());
			in2 = Integer.parseInt(s.next());
			if((in1|in2)==0)
				return;
			if(in1<=in2)
				System.out.printf("%d %d\n",in1,in2);
			else
				System.out.printf("%d %d\n",in2,in1);
		}
	} int in1 in1 in2; in2 while(true) {
			in1 = Integer.parseInt(s.next());
			in2 = Integer.parseInt(s.next());
			if((in1|in2)==0)
				return;
			if(in1<=in2)
				System.out.printf("%d %d\n",in1,in2);
			else
				System.out.printf("%d %d\n",in2,in1);
		} true {
			in1 = Integer.parseInt(s.next());
			in2 = Integer.parseInt(s.next());
			if((in1|in2)==0)
				return;
			if(in1<=in2)
				System.out.printf("%d %d\n",in1,in2);
			else
				System.out.printf("%d %d\n",in2,in1);
		} in1 = Integer.parseInt(s.next()) in1 Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s in2 = Integer.parseInt(s.next()) in2 Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s if((in1|in2)==0)
				return; (in1|in2)==0 (in1|in2) in1 in2 0 return; if(in1<=in2)
				System.out.printf("%d %d\n",in1,in2);
			else
				System.out.printf("%d %d\n",in2,in1); in1<=in2 in1 in2 System.out.printf("%d %d\n",in1,in2) System.out.printf System.out System System.out "%d %d\n" in1 in2 System.out.printf("%d %d\n",in2,in1) System.out.printf System.out System System.out "%d %d\n" in2 in1 String[] args args
import java.util.*;
class Main{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args) {
		int in1,in2;
		while(true) {
			in1 = Integer.parseInt(s.next());
			in2 = Integer.parseInt(s.next());
			if((in1|in2)==0)
				return;
			if(in1<=in2)
				System.out.printf("%d %d\n",in1,in2);
			else
				System.out.printf("%d %d\n",in2,in1);
		}
	}
}