#include using namespace std; int main(){ string S; cin >> S; string T; cin >> T; int A = 0, B = 0, AB = 0, O = 0; for (char c : S){ for (char d : T){ if ((c == 'A' and d != 'B') or (d == 'A' and c != 'B')){ A++; } else if ((c == 'B' and d != 'A') or (d == 'B' and c != 'A')){ B++; } else if ((c == 'A' and d == 'B') or (c == 'B' and d== 'A')){ AB++; } else { O++; } } } cout << 25 * A << ' ' << 25 * B << ' ' << 25 * AB << ' ' << 25 * O << endl; }