
import java.util.*;

public class Main {
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		
		int x,y;
		List<Integer> list = new ArrayList<Integer>();
		
		boolean flg1,flg2;
		flg1 =false;
		flg2 = false;
		
		//??????0??§????????????
		while(true){
			x = scan.nextInt();
			y = scan.nextInt();
			//x???0?????´??????true?????????
			if (x == 0){flg1= true;}
			//y???0?????´??????true?????????
			if (y == 0){flg2 = true;}
			//x??¨y???0?????´????????????????????????
			if ((flg1 == true) & (flg2 == true)){break;}
			
			//????????????????????????????????????????????????????????????
			list.add(x);
			list.add(y);
			
			Collections.sort(list);
			
			sb.append(list.get(0));
			sb.append(" ");
			sb.append(list.get(1));
			sb.append("\n");
			
			//???????????????????????????
			list.clear();
			
			//x??¨y????????????????????????0?????´????????????????¶??¶????????????????flg???false?????????
			flg1 = false;
			flg2 = false;
			
		}
		
		System.out.print(new String(sb));
		
		
	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz