use proconio::input; use proconio::fastout; use proconio::marker::Chars; #[fastout] #[allow(non_snake_case)] fn main() { input! { S: Chars, T: Chars, } let chk = vec![vec!['A', 'A'], vec!['A', 'B'], vec!['A', 'O'], vec!['B', 'B'], vec!['B', 'O'], vec!['O', 'O']]; assert!(chk.contains(&S)); assert!(chk.contains(&T)); let mut ans = vec![0, 0, 0, 0]; for i in 0..2 { for j in 0..2 { if (S[i] == 'A' && T[j] == 'B') || (S[i] == 'B' && T[j] == 'A') { ans[2] += 25; } else if S[i] == 'A' || T[j] == 'A' { ans[0] += 25; } else if S[i] == 'B' || T[j] == 'B' { ans[1] += 25; } else { ans[3] += 25; } } } println!("{}", ans.iter().map(|&x| x.to_string()).collect::>().join(" ")); }