import java.util.Arrays;
import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int xy[] = new int[2];
        StringBuilder sb;
        for(int j=1; j<=10000; j++){
            xy[0] = sc.nextInt();
            xy[1] = sc.nextInt();
            if(xy[0]==0 && xy[1]==0) break;
            Arrays.sort(xy);
            sb = new StringBuilder();
            sb.append(xy[0]).append(" ").append(xy[1]);
            System.out.println(sb.toString());
        }
        sc.close();
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int xy[] = new int[2];
        StringBuilder sb;
        for(int j=1; j<=10000; j++){
            xy[0] = sc.nextInt();
            xy[1] = sc.nextInt();
            if(xy[0]==0 && xy[1]==0) break;
            Arrays.sort(xy);
            sb = new StringBuilder();
            sb.append(xy[0]).append(" ").append(xy[1]);
            System.out.println(sb.toString());
        }
        sc.close();
    }
} Main public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int xy[] = new int[2];
        StringBuilder sb;
        for(int j=1; j<=10000; j++){
            xy[0] = sc.nextInt();
            xy[1] = sc.nextInt();
            if(xy[0]==0 && xy[1]==0) break;
            Arrays.sort(xy);
            sb = new StringBuilder();
            sb.append(xy[0]).append(" ").append(xy[1]);
            System.out.println(sb.toString());
        }
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int xy[] = new int[2];
        StringBuilder sb;
        for(int j=1; j<=10000; j++){
            xy[0] = sc.nextInt();
            xy[1] = sc.nextInt();
            if(xy[0]==0 && xy[1]==0) break;
            Arrays.sort(xy);
            sb = new StringBuilder();
            sb.append(xy[0]).append(" ").append(xy[1]);
            System.out.println(sb.toString());
        }
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int xy[] = new int[2]; xy new int[2] 2 StringBuilder sb; sb for(int j=1; j<=10000; j++){
            xy[0] = sc.nextInt();
            xy[1] = sc.nextInt();
            if(xy[0]==0 && xy[1]==0) break;
            Arrays.sort(xy);
            sb = new StringBuilder();
            sb.append(xy[0]).append(" ").append(xy[1]);
            System.out.println(sb.toString());
        } int j=1; int j=1; j 1 j<=10000 j 10000 j++ j++ j {
            xy[0] = sc.nextInt();
            xy[1] = sc.nextInt();
            if(xy[0]==0 && xy[1]==0) break;
            Arrays.sort(xy);
            sb = new StringBuilder();
            sb.append(xy[0]).append(" ").append(xy[1]);
            System.out.println(sb.toString());
        } {
            xy[0] = sc.nextInt();
            xy[1] = sc.nextInt();
            if(xy[0]==0 && xy[1]==0) break;
            Arrays.sort(xy);
            sb = new StringBuilder();
            sb.append(xy[0]).append(" ").append(xy[1]);
            System.out.println(sb.toString());
        } xy[0] = sc.nextInt() xy[0] xy 0 sc.nextInt() sc.nextInt sc xy[1] = sc.nextInt() xy[1] xy 1 sc.nextInt() sc.nextInt sc if(xy[0]==0 && xy[1]==0) break; xy[0]==0 && xy[1]==0 xy[0]==0 xy[0] xy 0 0 xy[1]==0 xy[1] xy 1 0 break; Arrays.sort(xy) Arrays.sort Arrays xy sb = new StringBuilder() sb new StringBuilder() sb.append(xy[0]).append(" ").append(xy[1]) sb.append(xy[0]).append(" ").append sb.append(xy[0]).append(" ") sb.append(xy[0]).append sb.append(xy[0]) sb.append sb xy[0] xy 0 " " xy[1] xy 1 System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb sc.close() sc.close sc String args[] args
import java.util.Arrays;
import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int xy[] = new int[2];
        StringBuilder sb;
        for(int j=1; j<=10000; j++){
            xy[0] = sc.nextInt();
            xy[1] = sc.nextInt();
            if(xy[0]==0 && xy[1]==0) break;
            Arrays.sort(xy);
            sb = new StringBuilder();
            sb.append(xy[0]).append(" ").append(xy[1]);
            System.out.println(sb.toString());
        }
        sc.close();
    }
}