#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i = 0;
  cin >> n;
  string c = "ROYGBIV", r = "";
  r = c;
  while (r.size() < n) {
    if (c[i] == r[r.size() - 1] || c[i] == r[r.size() - 2] ||
        c[i] == r[r.size() - 3] || c[i] == r[0] || c[i] == r[1] ||
        c[i] == r[2]) {
      i = (i + 1) % 7;
      continue;
    }
    r += c[i];
  }
  cout << r << endl;
  return 0;
}
