//https://yukicoder.me/problems/no/2920 fun main() { val s = readln() val t = readln() val counts = arrayOf(0, 0, 0, 0) for(cs in s) { for(ct in t) { val c = classify(cs, ct) counts[c]++ } } for(c in counts) { print("${c*25} ") } println() } fun classify(g1: Char, g2: Char): Int { val hasA = g1 == 'A' || g2 == 'A' val hasB = g1 == 'B' || g2 == 'B' return when { hasA && hasB -> 2 hasA -> 0 hasB -> 1 else -> 3 } }