```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
int a[3];
for (int i = 0; i <= 2; i++)
cin >> a[i];
char b[4];
cin >> b;
sort(a, a + 3);
for (int i = 0; i <= 2; i++) {
printf("%d", a[b[i] - 'A']);
if (i<3) cout<<" ";
}
return 0;
}
```
by LovelyTomato @ 2023-07-26 22:56:07
@[陈鸿辉](/user/59076) getchar()会把换行符读进去,直接cin>>b就可以
by LovelyTomato @ 2023-07-26 22:58:45