#include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); char S[3], T[3]; uint32_t i, j; cin >> S >> T; uint32_t P_A = 0, P_B = 0, P_AB = 0, P_O = 0; for (i = 0; i != 2; ++i) for (j = 0; j != 2; ++j) switch (S[i]) { case 'A': if (T[j] == 'B') P_AB += 25; else P_A += 25; break; case 'B': if (T[j] == 'A') P_AB += 25; else P_B += 25; break; default: switch (T[j]) { case 'A': P_A += 25; break; case 'B': P_B += 25; break; default: P_O += 25; break; } break; } cout << P_A << ' ' << P_B << ' ' << P_AB << ' ' << P_O << '\n'; return 0; }