import java.io.*;
public class Main{
	public static void main(String [] args) throws NumberFormatException, IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		while(true){
		String[] st=br.readLine().split(" ");
		int a=Integer.parseInt(st[0]);
		int b=Integer.parseInt(st[1]);
		if(a==0&&b==0)break;
		System.out.println(Math.min(a, b)+" "+Math.max(a, b));
		}
	}} import java.io.*; io.* java public class Main{
	public static void main(String [] args) throws NumberFormatException, IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		while(true){
		String[] st=br.readLine().split(" ");
		int a=Integer.parseInt(st[0]);
		int b=Integer.parseInt(st[1]);
		if(a==0&&b==0)break;
		System.out.println(Math.min(a, b)+" "+Math.max(a, b));
		}
	}} Main public static void main(String [] args) throws NumberFormatException, IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		while(true){
		String[] st=br.readLine().split(" ");
		int a=Integer.parseInt(st[0]);
		int b=Integer.parseInt(st[1]);
		if(a==0&&b==0)break;
		System.out.println(Math.min(a, b)+" "+Math.max(a, b));
		}
	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		while(true){
		String[] st=br.readLine().split(" ");
		int a=Integer.parseInt(st[0]);
		int b=Integer.parseInt(st[1]);
		if(a==0&&b==0)break;
		System.out.println(Math.min(a, b)+" "+Math.max(a, b));
		}
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
		String[] st=br.readLine().split(" ");
		int a=Integer.parseInt(st[0]);
		int b=Integer.parseInt(st[1]);
		if(a==0&&b==0)break;
		System.out.println(Math.min(a, b)+" "+Math.max(a, b));
		} true {
		String[] st=br.readLine().split(" ");
		int a=Integer.parseInt(st[0]);
		int b=Integer.parseInt(st[1]);
		if(a==0&&b==0)break;
		System.out.println(Math.min(a, b)+" "+Math.max(a, b));
		} String[] st=br.readLine().split(" "); st br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a=Integer.parseInt(st[0]); a Integer.parseInt(st[0]) Integer.parseInt Integer st[0] st 0 int b=Integer.parseInt(st[1]); b Integer.parseInt(st[1]) Integer.parseInt Integer st[1] st 1 if(a==0&&b==0)break; a==0&&b==0 a==0 a 0 b==0 b 0 break; System.out.println(Math.min(a, b)+" "+Math.max(a, b)) System.out.println System.out System System.out Math.min(a, b)+" "+Math.max(a, b) Math.min(a, b)+" "+Math.max(a, b) Math.min(a, b) Math.min Math a b " " Math.max(a, b) Math.max Math a b String [] args args public class Main{
	public static void main(String [] args) throws NumberFormatException, IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		while(true){
		String[] st=br.readLine().split(" ");
		int a=Integer.parseInt(st[0]);
		int b=Integer.parseInt(st[1]);
		if(a==0&&b==0)break;
		System.out.println(Math.min(a, b)+" "+Math.max(a, b));
		}
	}} public class Main{
	public static void main(String [] args) throws NumberFormatException, IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		while(true){
		String[] st=br.readLine().split(" ");
		int a=Integer.parseInt(st[0]);
		int b=Integer.parseInt(st[1]);
		if(a==0&&b==0)break;
		System.out.println(Math.min(a, b)+" "+Math.max(a, b));
		}
	}} Main
import java.io.*;
public class Main{
	public static void main(String [] args) throws NumberFormatException, IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		while(true){
		String[] st=br.readLine().split(" ");
		int a=Integer.parseInt(st[0]);
		int b=Integer.parseInt(st[1]);
		if(a==0&&b==0)break;
		System.out.println(Math.min(a, b)+" "+Math.max(a, b));
		}
	}}