
import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int i=0;
for(;;){
int n =sc.nextInt();
int m =sc.nextInt();
if(n==0 && m==0) break;
if(n>m){ i=n; n=m; m=i;} 
System.out.println(n+" "+m);
}
}
} import java.util.*; util.* java class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int i=0;
for(;;){
int n =sc.nextInt();
int m =sc.nextInt();
if(n==0 && m==0) break;
if(n>m){ i=n; n=m; m=i;} 
System.out.println(n+" "+m);
}
}
} Main public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int i=0;
for(;;){
int n =sc.nextInt();
int m =sc.nextInt();
if(n==0 && m==0) break;
if(n>m){ i=n; n=m; m=i;} 
System.out.println(n+" "+m);
}
} main {
Scanner sc = new Scanner(System.in);
int i=0;
for(;;){
int n =sc.nextInt();
int m =sc.nextInt();
if(n==0 && m==0) break;
if(n>m){ i=n; n=m; m=i;} 
System.out.println(n+" "+m);
}
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int i=0; i 0 for(;;){
int n =sc.nextInt();
int m =sc.nextInt();
if(n==0 && m==0) break;
if(n>m){ i=n; n=m; m=i;} 
System.out.println(n+" "+m);
} ; {
int n =sc.nextInt();
int m =sc.nextInt();
if(n==0 && m==0) break;
if(n>m){ i=n; n=m; m=i;} 
System.out.println(n+" "+m);
} {
int n =sc.nextInt();
int m =sc.nextInt();
if(n==0 && m==0) break;
if(n>m){ i=n; n=m; m=i;} 
System.out.println(n+" "+m);
} int n =sc.nextInt(); n sc.nextInt() sc.nextInt sc int m =sc.nextInt(); m sc.nextInt() sc.nextInt sc if(n==0 && m==0) break; n==0 && m==0 n==0 n 0 m==0 m 0 break; if(n>m){ i=n; n=m; m=i;} n>m n m { i=n; n=m; m=i;} i=n i n n=m n m m=i m i System.out.println(n+" "+m) System.out.println System.out System System.out n+" "+m n+" "+m n " " m String[] args args

import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int i=0;
for(;;){
int n =sc.nextInt();
int m =sc.nextInt();
if(n==0 && m==0) break;
if(n>m){ i=n; n=m; m=i;} 
System.out.println(n+" "+m);
}
}
}