import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

class Main {
    public static void main(String[] args) throws IOException {
       Scanner in = new Scanner(System.in);
       int a, b;
       int idx = 0;
       while(true) {
	       a = in.nextInt();
	       b = in.nextInt();
	       if(a == 0 && a == b) return;
	       if(a<b) System.out.printf("%d %d\n", a, b);
	       else System.out.printf("%d %d\n", b, a);
       }
    }
} import java.io.*; io.* java import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) throws IOException {
       Scanner in = new Scanner(System.in);
       int a, b;
       int idx = 0;
       while(true) {
	       a = in.nextInt();
	       b = in.nextInt();
	       if(a == 0 && a == b) return;
	       if(a<b) System.out.printf("%d %d\n", a, b);
	       else System.out.printf("%d %d\n", b, a);
       }
    }
} Main public static void main(String[] args) throws IOException {
       Scanner in = new Scanner(System.in);
       int a, b;
       int idx = 0;
       while(true) {
	       a = in.nextInt();
	       b = in.nextInt();
	       if(a == 0 && a == b) return;
	       if(a<b) System.out.printf("%d %d\n", a, b);
	       else System.out.printf("%d %d\n", b, a);
       }
    } main {
       Scanner in = new Scanner(System.in);
       int a, b;
       int idx = 0;
       while(true) {
	       a = in.nextInt();
	       b = in.nextInt();
	       if(a == 0 && a == b) return;
	       if(a<b) System.out.printf("%d %d\n", a, b);
	       else System.out.printf("%d %d\n", b, a);
       }
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int a a b; b int idx = 0; idx 0 while(true) {
	       a = in.nextInt();
	       b = in.nextInt();
	       if(a == 0 && a == b) return;
	       if(a<b) System.out.printf("%d %d\n", a, b);
	       else System.out.printf("%d %d\n", b, a);
       } true {
	       a = in.nextInt();
	       b = in.nextInt();
	       if(a == 0 && a == b) return;
	       if(a<b) System.out.printf("%d %d\n", a, b);
	       else System.out.printf("%d %d\n", b, a);
       } a = in.nextInt() a in.nextInt() in.nextInt in b = in.nextInt() b in.nextInt() in.nextInt in if(a == 0 && a == b) return; a == 0 && a == b a == 0 a 0 a == b a b return; if(a<b) System.out.printf("%d %d\n", a, b);
	       else System.out.printf("%d %d\n", b, a); a<b a b System.out.printf("%d %d\n", a, b) System.out.printf System.out System System.out "%d %d\n" a b System.out.printf("%d %d\n", b, a) System.out.printf System.out System System.out "%d %d\n" b a String[] args args
import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

class Main {
    public static void main(String[] args) throws IOException {
       Scanner in = new Scanner(System.in);
       int a, b;
       int idx = 0;
       while(true) {
	       a = in.nextInt();
	       b = in.nextInt();
	       if(a == 0 && a == b) return;
	       if(a<b) System.out.printf("%d %d\n", a, b);
	       else System.out.printf("%d %d\n", b, a);
       }
    }
}