#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); int N; cin >> N; string S; cin >> S; auto match = [&](string s, string p) -> bool { assert(s.size() == p.size()); for (int i = 0; i < (int)s.size(); i++) { if (s[i] == p[i] || s[i] == '?') { continue; } return false; } return true; }; vector patterns = {"wa", "wo", "n"}; // dp[i] := S[0,i) が wawon 文字列であるか否か vector dp(N + 1); dp[0] = true; for (int i = 0; i < N; i++) { if (not dp[i]) { continue; } for (auto p : patterns) { int n = p.size(); if (i + n <= N && match(S.substr(i, n), p)) { dp[i + n] = true; } } } string ans = (dp[N] ? "Yes" : "No"); cout << ans << '\n'; return 0; }