#include #include #include #include using namespace std; using ll = long long; int main() { int n; cin >> n; int m; cin >> m; string v = string(n + 2, '.'); string ans = string(n + 2, '.'); for (int i=0; i> a; a--; cin >> v[a]; } for (int i=0; i st; for (int j=0; j<3; j++) { if (v[i + j] == '.') continue; if (!st.count(v[i + j])) { ans[i + j] = v[i + j]; } st.insert(v[i + j]); } for (int j=0; j<3; j++) { if (ans[i + j] != '.') continue; if (!st.count('R')) { ans[i + j] = 'R'; st.insert('R'); } else if (!st.count('G')) { ans[i + j] = 'G'; st.insert('G'); } else { ans[i + j] = 'B'; st.insert('B'); } } } cout << ans.substr(0, n) << endl; }