N, M = [int(s) for s in input().split()] S = [*input()] T = input() if T == "Warong": S[:M] = ["A"] * M if "W" not in S[M:] and S[M:].count("?") == 1: S[S.index("?")] = "W" else: if "W" in S[M:] and all(s in ("A", "?") for s in S[:M]) and S[:M].count("?") == 1: S[S[:M].index("?")] = "W" elif all(s == "A" for s in S[:M]): S[M:] = ["A"] * (N - M) print(*S, sep="")