/*
入力 validation。WA なら OK。
*/

#include "testlib.h"
#include<bits/stdc++.h>
using namespace std;

using ll = long long;
const ll Nmin = 1, Nmax = 100000;
const ll Mmin = 1, Mmax = 100000;

int main(){
	registerValidation();
    ll N = inf.readLong(Nmin,Nmax);
    inf.readSpace();
    ll M = inf.readLong(Mmin,Mmax);
    inf.readEoln();
    string S = inf.readString();
    inf.readEoln();
    assert((ll)(S.size()) == N + N + M + M);
    ll W = 0, A = 0, C = 0;
    for (auto c : S){
        if (c == 'W') W++;
        if (c == 'A') A++;
        if (c == 'C') C++;
    }
    assert(W == N);
    assert(A == N + M);
    assert(C == M);
    inf.readEof();
	return 0;
}