#ifdef __LOCAL #define _GLIBCXX_DEBUG #include "debug2.h" #endif #ifndef __LOCAL #define show(...) #define SET_GROUP(x) #define SET_MAXCNT(x) #endif #include using namespace std; //#include //using namespace atcoder; //#include //using bigint = boost::multiprecision::cpp_int; #define SIZE(x) (int)(x.size()) #define ALL(x) x.begin(),x.end() using ll = long long; //int di[] = {1, 0, -1, 0, 1, -1, -1, 1}; //int dj[] = {0, 1, 0, -1, 1, 1, -1, -1}; templatebool chmin(T& x,T y){if(x>y){x=y;return true;}return false;} templatebool chmax(T& x,T y){if(xvectormatrix(int n1,T val){return vector(n1,val);} templatevector>matrix(int n1,int n2,T val){return vector>(n1,matrix(n2,val));} templatevector>>matrix(int n1,int n2,int n3,T val){return vector>>(n1,matrix(n2,n3,val));} templatevector>>>matrix(int n1,int n2,int n3,int n4,T val){return vector>>>(n1,matrix(n2,n3,n4,val));} templateT sum(vectorx){T r=0;for(auto e:x)r+=e;return r;} templateT max(vectorx){T r=x[0];for(auto e:x)chmax(r,e);return r;} templateT min(vectorx){T r=x[0];for(auto e:x)chmin(r,e);return r;} templatesettoSet(vectorx){set r;for(auto e:x)r.emplace(e);return r;} templatemaptoMap(vectorx){mapmp;for(auto e:x)mp[e]++;return mp;} templatevectortoVector(setx){vector r;for(auto e:x)r.push_back(e);return r;} templatepair operator+(pairx,pairy){return make_pair(x.first+y.first,x.second+y.second);} templatepair operator-(pairx,pairy){return make_pair(x.first-y.first,x.second-y.second);} templateistream&operator>>(istream&is,tuple&x){cin>>get<0>(x)>>get<1>(x);return is;} templateistream&operator>>(istream&is,tuple&x){cin>>get<0>(x)>>get<1>(x)>>get<2>(x);return is;} templateistream&operator>>(istream&is,pair&x){cin>>x.first>>x.second;return is;} templateistream&operator>>(istream&is,vector&x){for(auto&&e:x)is>>e;return is;} templateistream&operator>>(istream&is,vector>&x){for(auto&&e:x)for(auto&&f:e)is>>f;return is;} templateostream&operator<<(ostream&os,const vector&x){for(auto e:x)os<ostream&operator<<(ostream&os,const vector>&x){for(auto e:x){for(auto f:e)os<> s >> t; show(s, t); int a = 0, b = 0, ab = 0, o = 0; for(int i = 0; i < 2; ++i) for(int j = 0; j < 2; ++j){ string p = s.substr(i, 1) + t.substr(j, 1); show(p); if(p == "AA" || p == "AO" || p == "OA"){ a++; }else if(p == "BB" || p == "BO" || p == "OB"){ b++; }else if(p == "AB" || p == "BA"){ ab++; }else if(p == "OO"){ o++; } } cout << a * 25 << " " << b * 25 << " " << ab * 25 << " " << o * 25 << endl; return 0; }