using System; class Program { static void Main() { string S = Console.ReadLine(); string T = Console.ReadLine(); int A = 0, B = 0, AB = 0, O = 0; for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { char s = S[i]; char t = T[j]; bool hasA = (s == 'A' || t == 'A'); bool hasB = (s == 'B' || t == 'B'); if (hasA && !hasB) A++; else if (hasB && !hasA) B++; else if (hasA && hasB) AB++; else O++; } } // 4 通りなので、カウント × 25 がそのまま [%] Console.WriteLine($"{A*25} {B*25} {AB*25} {O*25}"); } }