#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0, g = 0, i = 0, s = 0;
  string key = "ROYGBIV", k = "";
  cin >> n;
  while (s < n) {
    if (i < 7) {
      k = k + key[i];
      s++;
      i++;
    } else {
      i = i % 7;
      if ((n - s) <= 3 && g == 0) {
        i = 3;
        g = 1;
        if (key[s - 2] == 'G') {
          i++;
        }
      }
      k = k + key[i];
      i++;
      s++;
    }
  }
  cout << k;
  return 0;
}
