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

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

return 0;
}
