import java.util.*;

public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> al = new ArrayList<>();

		int x = 999;
		int y = 999;
		int cnt = 0;
		
		while(x != 0 || y != 0) {
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0) {
				break;
			} else if(x < y) {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} else if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			}
		}
		
		int i = 0;
		while(i < cnt) {
			System.out.println(al.get(i) + " " + al.get(i+1));
			i = i + 2;
		}
	
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> al = new ArrayList<>();

		int x = 999;
		int y = 999;
		int cnt = 0;
		
		while(x != 0 || y != 0) {
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0) {
				break;
			} else if(x < y) {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} else if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			}
		}
		
		int i = 0;
		while(i < cnt) {
			System.out.println(al.get(i) + " " + al.get(i+1));
			i = i + 2;
		}
	
	}
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> al = new ArrayList<>();

		int x = 999;
		int y = 999;
		int cnt = 0;
		
		while(x != 0 || y != 0) {
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0) {
				break;
			} else if(x < y) {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} else if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			}
		}
		
		int i = 0;
		while(i < cnt) {
			System.out.println(al.get(i) + " " + al.get(i+1));
			i = i + 2;
		}
	
	} main {
		
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> al = new ArrayList<>();

		int x = 999;
		int y = 999;
		int cnt = 0;
		
		while(x != 0 || y != 0) {
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0) {
				break;
			} else if(x < y) {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} else if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			}
		}
		
		int i = 0;
		while(i < cnt) {
			System.out.println(al.get(i) + " " + al.get(i+1));
			i = i + 2;
		}
	
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Integer> al = new ArrayList<>(); al new ArrayList<>() int x = 999; x 999 int y = 999; y 999 int cnt = 0; cnt 0 while(x != 0 || y != 0) {
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0) {
				break;
			} else if(x < y) {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} else if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			}
		} x != 0 || y != 0 x != 0 x 0 y != 0 y 0 {
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0) {
				break;
			} else if(x < y) {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} else if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			}
		} x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc if(x == 0 && y == 0) {
				break;
			} else if(x < y) {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} else if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				break;
			} break; if(x < y) {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} else if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} x < y x y {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} cnt = cnt + 2 cnt cnt + 2 cnt 2 al.add(x) al.add al x al.add(y) al.add al y if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} x > y x y {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} cnt = cnt + 2 cnt cnt + 2 cnt 2 al.add(y) al.add al y al.add(x) al.add al x {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} cnt = cnt + 2 cnt cnt + 2 cnt 2 al.add(x) al.add al x al.add(y) al.add al y int i = 0; i 0 while(i < cnt) {
			System.out.println(al.get(i) + " " + al.get(i+1));
			i = i + 2;
		} i < cnt i cnt {
			System.out.println(al.get(i) + " " + al.get(i+1));
			i = i + 2;
		} System.out.println(al.get(i) + " " + al.get(i+1)) System.out.println System.out System System.out al.get(i) + " " + al.get(i+1) al.get(i) + " " + al.get(i+1) al.get(i) al.get al i " " al.get(i+1) al.get al i+1 i 1 i = i + 2 i i + 2 i 2 String[] args args public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> al = new ArrayList<>();

		int x = 999;
		int y = 999;
		int cnt = 0;
		
		while(x != 0 || y != 0) {
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0) {
				break;
			} else if(x < y) {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} else if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			}
		}
		
		int i = 0;
		while(i < cnt) {
			System.out.println(al.get(i) + " " + al.get(i+1));
			i = i + 2;
		}
	
	}
} public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> al = new ArrayList<>();

		int x = 999;
		int y = 999;
		int cnt = 0;
		
		while(x != 0 || y != 0) {
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0) {
				break;
			} else if(x < y) {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} else if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			}
		}
		
		int i = 0;
		while(i < cnt) {
			System.out.println(al.get(i) + " " + al.get(i+1));
			i = i + 2;
		}
	
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> al = new ArrayList<>();

		int x = 999;
		int y = 999;
		int cnt = 0;
		
		while(x != 0 || y != 0) {
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0) {
				break;
			} else if(x < y) {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			} else if(x > y) {
				cnt = cnt + 2;
				al.add(y);
				al.add(x);
			} else {
				cnt = cnt + 2;
				al.add(x);
				al.add(y);
			}
		}
		
		int i = 0;
		while(i < cnt) {
			System.out.println(al.get(i) + " " + al.get(i+1));
			i = i + 2;
		}
	
	}
}