#include<iostream>
using namespace std;
int main(){

long long n,c,k;
cin>>n>>c>>k;
if(n>c){
cout<<n<<"A"<<endl;
cout<<c<<"B"<<endl;
cout<<k<<endl;
}
if(c>n){
cout<<c<<"A"<<endl;
cout<<n<<"B"<<endl;
cout<<k<<endl;
}
if(n<k){
    n=k-(k-n);
    cout<<n;
}
else{
    if(n>k){
        n=n-(n-k);
        cout<<n;

}
    else{
        if(c<k){
            c=k-(k-c);
            cout<<c;
        }

        else{
            if(c>k){
                c=c-(c-k);
                cout<<c;
            }
            }
            }
            }

return 0;
}
