#include #define rep(i,a,b) for(int i=a;i> N >> S; vector wins = {"ooo", "oo-", "-oo", "--o-", "-o--"}; fore (win, wins) rep (i, 0, N) if (S.substr(i, win.size()) == win) return yes; vector okvec; rep (i, 0, N) if (S[i] == 'o') okvec.push_back(i); int r = okvec.size(); rep (i, 0, r) { int s = okvec[i]; int e = okvec[i + 1]; int lose = 0; int blank = 0; rep (j, s + 1, e) { if (S[j] == 'x') lose++; else blank++; } if (lose == 0 && blank % 2 == 1) return yes; } return no; } int main() { int T; cin >> T; rep (i, 0, T) cout << solve() << endl; }