#include #include using namespace std; int main () { char DNA[150],RNA[150]; int N, T; while(cin>>T) { while(T--) { cin>>N; getchar(); gets(DNA); gets(RNA); for(int i = 0; i < N; i++) { if(DNA[i] == 'A' && RNA[i] == 'U') { continue; } else if(DNA[i] == 'T' && RNA[i] == 'A') continue; else if (DNA[i] == 'C' && RNA[i] == 'G') continue; else if(DNA[i] == 'G' && RNA[i] == 'C') continue; else { cout<<"NO"<