import ru.ifmo.testlib.Checker;
import ru.ifmo.testlib.InStream;
import ru.ifmo.testlib.Outcome;

public class Check implements Checker {

    @Override
    public Outcome test(InStream inf, InStream ouf, InStream anf) {
    int n = inf.nextInt();
    int a = inf.nextInt();
    int b = inf.nextInt();
    int c = inf.nextInt();
    String ans = ouf.nextToken();
    if (ans.length() != n) {
        return new Outcome(Outcome.Type.WA, String.format("Incorrect length: %d expected, %d found", n, ans.length()));
    }
    int haveA = 0;
    int haveB = 0;
    int haveC = 0;
    for (int i = 0; i < n; i++) {
        char ch = ans.charAt(i);
        if ('A' <= ch && ch <= 'Z') {
        haveA++;
        } else if ('a' <= ch && ch <= 'z') {
        haveB++;
        } else if ('0' <= ch && ch <= '9') {
        haveC++;
        } else {
        return new Outcome(Outcome.Type.WA, String.format("Unexpected symbol at position %d: '%c'", (i+1), ch));
        }
    }
    if (haveA < a) {
        return new Outcome(Outcome.Type.WA, String.format("Only %d uppercase letters found, at least %d expected", haveA, a));
    }
    if (haveB < b) {
        return new Outcome(Outcome.Type.WA, String.format("Only %d lowercase letters found, at least %d expected", haveB, b));
    }
    if (haveC < c) {
        return new Outcome(Outcome.Type.WA, String.format("Only %d digits found, at least %d expected", haveC, c));
    }
    for (int i = 0; i < n - 1; i++) {
        char ch1 = ans.charAt(i);
        char ch2 = ans.charAt(i + 1);
        if (ch1 == ch2) {
        return new Outcome(Outcome.Type.WA, String.format("Two equal consecutive '%c's at positions %d and %d", ch1, i + 1, i + 2));
        }
    }
        return new Outcome(Outcome.Type.OK, String.format("%d/%d/%d", haveA, haveB, haveC));
    }
}
