#include<iostream>
#include<cstring>
using namespace std;
char list1[256], temp[110], ans[3];
int main(){
cin >> list1;
memset(ans,0,sizeof(ans));
int cnt = 0, m = strlen(list1);
for(int i = 0; i < m; i+=5){
temp[cnt] = list1[i];
cnt += 2;
}
cnt = 1;
for(int i = 3; i < m; i+=5){
temp[cnt] = list1[i];
cnt += 2;
}
cnt = 0;
while(cnt < strlen(temp)){
if('0' <= temp[cnt+1] && temp[cnt+1] <= '9'){
ans[temp[cnt] - 'a'] = temp[cnt + 1] - '0';
}else{
ans[temp[cnt] - 'a'] = ans[temp[cnt + 1] - 'a'];
}
cnt+=2;
}
cout << ans[0] << " " << ans[1] << " " << ans[2];
return 0;
}
老是卡在cin运行不下去,所以就TLE了,怎么解决,谢谢!