import java.util.Scanner;

public class Main {
	public static void main(String[] age){
		Scanner imput = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			String x = imput.nextLine();
			String[] arrayimput = x.split(" ");
			int a = Integer.parseInt(arrayimput[0]);
			int b = Integer.parseInt(arrayimput[1]);
			int c;
			if(a == 0 & b == 0) break;
			if(a > b){
				c = a;
				a = b;
				b = c;
			}
			sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)).append("\n");
		}
		System.out.print(sb);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] age){
		Scanner imput = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			String x = imput.nextLine();
			String[] arrayimput = x.split(" ");
			int a = Integer.parseInt(arrayimput[0]);
			int b = Integer.parseInt(arrayimput[1]);
			int c;
			if(a == 0 & b == 0) break;
			if(a > b){
				c = a;
				a = b;
				b = c;
			}
			sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)).append("\n");
		}
		System.out.print(sb);
	}
} Main public static void main(String[] age){
		Scanner imput = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			String x = imput.nextLine();
			String[] arrayimput = x.split(" ");
			int a = Integer.parseInt(arrayimput[0]);
			int b = Integer.parseInt(arrayimput[1]);
			int c;
			if(a == 0 & b == 0) break;
			if(a > b){
				c = a;
				a = b;
				b = c;
			}
			sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)).append("\n");
		}
		System.out.print(sb);
	} main {
		Scanner imput = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			String x = imput.nextLine();
			String[] arrayimput = x.split(" ");
			int a = Integer.parseInt(arrayimput[0]);
			int b = Integer.parseInt(arrayimput[1]);
			int c;
			if(a == 0 & b == 0) break;
			if(a > b){
				c = a;
				a = b;
				b = c;
			}
			sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)).append("\n");
		}
		System.out.print(sb);
	} Scanner imput = new Scanner(System.in); imput new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() while(true){
			String x = imput.nextLine();
			String[] arrayimput = x.split(" ");
			int a = Integer.parseInt(arrayimput[0]);
			int b = Integer.parseInt(arrayimput[1]);
			int c;
			if(a == 0 & b == 0) break;
			if(a > b){
				c = a;
				a = b;
				b = c;
			}
			sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)).append("\n");
		} true {
			String x = imput.nextLine();
			String[] arrayimput = x.split(" ");
			int a = Integer.parseInt(arrayimput[0]);
			int b = Integer.parseInt(arrayimput[1]);
			int c;
			if(a == 0 & b == 0) break;
			if(a > b){
				c = a;
				a = b;
				b = c;
			}
			sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)).append("\n");
		} String x = imput.nextLine(); x imput.nextLine() imput.nextLine imput String[] arrayimput = x.split(" "); arrayimput x.split(" ") x.split x " " int a = Integer.parseInt(arrayimput[0]); a Integer.parseInt(arrayimput[0]) Integer.parseInt Integer arrayimput[0] arrayimput 0 int b = Integer.parseInt(arrayimput[1]); b Integer.parseInt(arrayimput[1]) Integer.parseInt Integer arrayimput[1] arrayimput 1 int c; c if(a == 0 & b == 0) break; a == 0 & b == 0 a == 0 a 0 b == 0 b 0 break; if(a > b){
				c = a;
				a = b;
				b = c;
			} a > b a b {
				c = a;
				a = b;
				b = c;
			} c = a c a a = b a b b = c b c sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)).append("\n") sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)).append sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)) sb.append(Integer.toString(a)).append(" ").append sb.append(Integer.toString(a)).append(" ") sb.append(Integer.toString(a)).append sb.append(Integer.toString(a)) sb.append sb Integer.toString(a) Integer.toString Integer a " " Integer.toString(b) Integer.toString Integer b "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] age age public class Main {
	public static void main(String[] age){
		Scanner imput = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			String x = imput.nextLine();
			String[] arrayimput = x.split(" ");
			int a = Integer.parseInt(arrayimput[0]);
			int b = Integer.parseInt(arrayimput[1]);
			int c;
			if(a == 0 & b == 0) break;
			if(a > b){
				c = a;
				a = b;
				b = c;
			}
			sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)).append("\n");
		}
		System.out.print(sb);
	}
} public class Main {
	public static void main(String[] age){
		Scanner imput = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			String x = imput.nextLine();
			String[] arrayimput = x.split(" ");
			int a = Integer.parseInt(arrayimput[0]);
			int b = Integer.parseInt(arrayimput[1]);
			int c;
			if(a == 0 & b == 0) break;
			if(a > b){
				c = a;
				a = b;
				b = c;
			}
			sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)).append("\n");
		}
		System.out.print(sb);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] age){
		Scanner imput = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			String x = imput.nextLine();
			String[] arrayimput = x.split(" ");
			int a = Integer.parseInt(arrayimput[0]);
			int b = Integer.parseInt(arrayimput[1]);
			int c;
			if(a == 0 & b == 0) break;
			if(a > b){
				c = a;
				a = b;
				b = c;
			}
			sb.append(Integer.toString(a)).append(" ").append(Integer.toString(b)).append("\n");
		}
		System.out.print(sb);
	}
}