#include using namespace std; #define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++) #define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++) #define MOD 1000000007 #define int long long #define ALL(a) (a).begin(),(a).end() #define vi vector #define vii vector #define pii pair #define priq priority_queue #define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key))) #define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key))) #define tii tuple #define Priq priority_queue> #define pb push_back #define mp make_pair #define INF (1ll<<60) char func(int N,string S){ rep(j,0,N-2){ string T=S.substr(j,3); if(T=="ooo") return 'O'; if(T=="-oo"||T=="oo-"||T=="o-o") return 'O'; } rep(i,0,N){ if(S[i]=='-'){ S[i]='o'; int sum=0; rep(j,0,N-2){ string T=S.substr(j,3); if(T=="ooo") return 'O'; if(T=="-oo"||T=="oo-") sum++; } if(sum>=2) return 'O'; S[i]='-'; } } return 'X'; } signed main(){ int T; cin>>T; rep(_,0,T){ int N; string S; cin>>N>>S; cout<