#include<bits/stdc++.h>
using namespace std;
int main() {
char x,y;
long long a,b,c;
cin>>a>>b>>c>>x>>y;
if(x=='A'){
if(y=='B')
cout<<a<<" "<<b<<" "<<c;
else
cout<<a<<" "<<c<<" "<<b;
}
if(x=='B'){
if(y=='C')
cout<<b<<" "<<c<<" "<<a;
else
cout<<b<<" "<<a<<" "<<c;
}
if(x=='C'){
if(y=='A')
cout<<c<<" "<<a<<" "<<b;
else
cout<<c<<" "<<b<<" "<<a;
}
return 0;
}
哪里错了