#include <bits/stdc++.h>
#define b_e(a) a.begin(),a.end()
#define F(i,a,b) for(i=a;i<=b;++i)
#define G(i,a,b) for(i=a;i>=b;--i)
#define R(i,a,b) for(i=a;i<b;++i)
#define P(i,a,b) for(i=a;i>b;--i)
typedef signed char i8;typedef unsigned char u8;
typedef short i16;typedef unsigned short u16;
typedef int i32;typedef unsigned u32;
typedef long long i64;typedef unsigned long long u64;
typedef float f32;typedef double f64;
namespace _ns{
template<typename T>T& max(T& a,T& b){return a>b?a:b;}
template<typename T,typename... A>T& max(T& a,T& b,A& ...c){return max(a=max(a,b),c...);}
template<typename T>T& min(T& a,T& b){return a<b?a:b;}
template<typename T,typename... A>T& min(T& a,T& b,A& ...c){return min(a=min(a,b),c...);}
}
template<typename... A>void debug(A ...a){fprintf(stderr,a...);fflush(stderr);}
template<typename T,typename... A>T max(T a,A ...b){return _ns::max(a,b...);}
template<typename T,typename... A>T min(T a,A ...b){return _ns::min(a,b...);}
template<typename T1,typename T2>void to_max(T1& a,T2 b){if(a<b){a=b;}}
template<typename T1,typename T2>void to_min(T1& a,T2 b){if(b<a){a=b;}}
constexpr int A(5e5+5);
char t[A<<2],lz[A<<2];
int n,m;
#define ls u<<1
#define rs u<<1|1
void push_up(int u){
t[u]=t[ls]|t[rs];
}
void build(int u=1,int l=1,int r=n){
if(l==r){
std::cin>>t[u];
t[u]=1<<(t[u]-'A');
return;
}
lz[u]=-1;
const int mid((l+r)>>1);
build(ls,l,mid);
build(rs,mid+1,r);
push_up(u);
}
void tag(int u,char k,int l,int r){
t[u]=1<<k;
lz[u]=k;
}
void push_down(int u,int l,int r){
if(~lz[u]){
const int mid((l+r)>>1);
tag(ls,lz[u],l,mid);
tag(rs,lz[u],mid+1,r);
lz[u]=-1;
}
}
void update(int x,int y,char k,int u=1,int l=1,int r=n){
if(x<=l&&r<=y){
tag(u,l,r,k);
return;
}
push_down(u,l,r);
const int mid((l+r)>>1);
if(x<=mid){
update(x,y,k,ls,l,mid);
}
if(mid<y){
update(x,y,k,rs,mid+1,r);
}
push_up(u);
}
char query(int x,int y,int u=1,int l=1,int r=n){
if(r<x||y<l){
return 0;
}
if(x<=l&&r<=y){
return t[u];
}
const int mid((l+r)>>1);
return query(x,y,ls,l,mid)|query(x,y,rs,mid+1,r);
}
#undef ls
#undef rs
int main(){
char o,c;
int l,r;
std::cin.tie(nullptr)->sync_with_stdio(false);
std::cin>>n;
build();
std::cin>>m;
for(;m--;){
std::cin>>o>>l>>r;
if(o=='A'){
std::cin>>c;
update(l,r,c);
}else{
if(l==1||r==n){
std::cout<<(__builtin_popcount(query(l,r))==1?"Yes\n":"No\n");
}else{
std::cout<<(__builtin_popcount(query(l,r))==1&&query(l-1,l-1)!=query(r+1,r+1)?"Yes\n":"No\n");
}
}
}
return 0;
}