/* -*- coding: utf-8 -*- * * 2920.cc: No.2920 Blood Type - yukicoder */ #include #include using namespace std; /* constant */ enum { A, B, AB, O }; /* typedef */ /* global variables */ int ps[4]; /* subroutines */ int bt(char s, char t) { if ((s == 'A' && t != 'B') || (t == 'A' && s != 'B')) return A; if ((s == 'B' && t != 'A') || (t == 'B' && s != 'A')) return B; if ((s == 'A' && t == 'B') || (t == 'A' && s == 'B')) return AB; return O; } /* main */ int main() { char s[8], t[8]; scanf("%s%s", s, t); for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) ps[bt(s[i], t[j])] += 25; for (int i = 0; i < 4; i++) printf("%d%c", ps[i], (i < 3) ? ' ' : '\n'); return 0; }