#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef long long int ll; //#include using namespace std; int main() { int Q; Q = 1; //cin >> Q; while (Q--) { string a, b; cin >> a >> b; mapmp; for (int i = 0; i < a.size(); i++) { for (int j = 0; j < b.size(); j++) { string x; x.push_back(a[i]); x.push_back(b[j]); sort(x.begin(), x.end()); if (x[0] != 'O') { if (x[1] == 'O')x[1] = x[0]; } mp[x] += 25; } } cout << mp["AA"] << " "; cout << mp["BB"] << " "; cout << mp["AB"] << " "; cout << mp["OO"] << " "; } return 0; }