This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "Anna.h"
#include<bits/stdc++.h>
#define ll long long
using namespace std;
char diff(char a,char b){
   if(a!='R' and b!='R')
      return 'R';
   if(a!='G' and b!='G')
      return 'G';
   if(a!='B' and b!='B')
      return 'B';
}
pair<string, int> anna(int n, string s) {
   string T;
   int N=n;
   string S=s;
   for(int i=0;i<N;i++)
      if(S[i]=='R')
         T.push_back('G');
      else
         T.push_back('R');
   if(N<=10)
      return {T,N};
   T[1]=T[N-1]=diff(s[1],s[N-1]);
   T[N-2]=diff(s[N-2],T[0]);
   return {T,N-1};
}
#include "Anna.h"
#include<bits/stdc++.h>
#define ll long long
using namespace std;
namespace {
   int N,L;
};
void init(int n, int l) {
   ::N=n;
   ::L=l;
}
int bruno(string s){
   if(::N == ::L)
      return 1;
   string S=s;
   if(S[0]==S.back())
      return 2;
   return 1;
}
Compilation message (stderr)
Anna.cpp: In function 'char diff(char, char)':
Anna.cpp:12:1: warning: control reaches end of non-void function [-Wreturn-type]
   12 | }
      | ^| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |