#include <bits/stdc++.h>
using namespace std;
char get(char _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa) {
  char _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQtemp[] = {
      ((char)(0x7fc + 8030 - 0x2708)), ((char)(0x7ba + 1232 - 0xc43)),
      ((char)(0xc36 + 6117 - 0x23d9))};
  for (int _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi = 0;
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi < 3;
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi++) {
    if (_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQtemp
            [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi] ==
        _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa) {
      return _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQtemp
          [(_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi + 1) % 3];
    }
  }
}
char _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQget2(
    char _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa,
    char _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQb) {
  set<char> _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQtemp1 = {
      ((char)(0x52d + 82 - 0x52d)), ((char)(0x744 + 2857 - 0x1226)),
      ((char)(0x2ab + 3015 - 0xe30))};
  char _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQtemp[] = {
      ((char)(0x173 + 5342 - 0x15ff)), ((char)(0x1c2 + 1036 - 0x587)),
      ((char)(0x10fd + 1681 - 0x174c))};
  for (int _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi = 0;
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi < 3;
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi++) {
    if (_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQtemp
                [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi] ==
            _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa ||
        _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQtemp
                [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi] ==
            _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQb) {
      _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQtemp1.erase(
          _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQtemp1.find(
              _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQtemp
                  [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi]));
    }
  }
  return *_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQtemp1.begin();
}
void _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQmakeDif1(
    string& _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa) {
  char _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQdis =
      get(_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa[0]);
  for (int _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi = 0;
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi <
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa.length();
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi++) {
    if (_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi & 1) {
      _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa
          [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi] =
              _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQdis;
    }
  }
}
void _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQmakeDif2(
    string& _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa,
    char _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQnxt) {
  char _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQdis =
      _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQget2(
          _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa[0],
          _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQnxt);
  for (int _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi = 0;
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi <
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa.length();
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi++) {
    if (_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi & 1) {
      _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa
          [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi] =
              _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQdis;
    }
  }
}
int main() {
  int _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQn;
  cin >> _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQn;
  string _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa;
  cin >> _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa;
  string _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQcur = "";
  _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQcur.push_back(
      _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa[0]);
  vector<string> _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs;
  for (int _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi = 1;
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi <
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa.length();
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi++) {
    if (_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa
            [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi] !=
        _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQcur
            [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQcur.size() - 1]) {
      _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs.push_back(
          _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQcur);
      _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQcur = "";
      _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQcur.push_back(
          _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa
              [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi]);
    } else {
      _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQcur.push_back(
          _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQa
              [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi]);
    }
  }
  if (_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQcur.length() > 0) {
    _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs.push_back(
        _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQcur);
  }
  int _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQres = 0;
  for (int _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi = 0;
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi <
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs.size();
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi++) {
    if (_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi ==
        _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs.size() - 1) {
      _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQmakeDif1(
          _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs
              [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi]);
      _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQres +=
          (_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs
               [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi]
                   .length() /
           2);
    } else {
      if (_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs
              [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi]
                  .size() &
          1) {
        _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQmakeDif1(
            _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs
                [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi]);
        _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQres +=
            (_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs
                 [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi]
                     .length() /
             2);
      } else {
        _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQmakeDif2(
            _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs
                [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi],
            _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs
                [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi + 1][0]);
        _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQres +=
            (_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs
                 [_sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQi]
                     .length() /
             2);
      }
    }
  }
  cout << _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQres << endl;
  for (auto _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQx :
       _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQallSegs) {
    cout << _sAcCNVswg_sIEW921E8_sEOT69SvA_sYBrvfbHQx;
  }
  cout << endl;
  return 0;
}
