The Easter Rabbit laid n eggs in a circle and is about to paint them. Each egg should be painted one color out of 7: red, orange, yellow, green, blue, indigo or violet. Also, the following conditions should be satisfied:  Each of the seven colors should be used to paint at least one egg.  Any four eggs lying sequentially should be painted different colors. Help the Easter Rabbit paint the eggs in the required manner. We know that it is always possible.

The only line contains an integer n — the amount of eggs (7 ≤ n ≤ 100).

Print one line consisting of n characters. The i-th character should describe the color of the i-th egg in the order they lie in the circle. The colors should be represented as follows: "R" stands for red, "O" stands for orange, "Y" stands for yellow, "G" stands for green, "B" stands for blue, "I" stands for indigo, "V" stands for violet. If there are several answers, print any of them.

NoteThe way the eggs will be painted in the first sample is shown on the picture:

import java.util.Scanner;

public class EasterEggs {
	public static void main (String arg[]){
		Scanner s =new Scanner(System.in);
		int n=s.nextInt();
		char[]arr={'G','B','I','V'};
		String ans="ROY";
		for(int i=3;i<n;i++)
			ans+=arr[i%4];
		System.out.println(ans);
	}
}

import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author rabeckiy
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        int n = in.nextInt();
        out.print("ROY");
        char[] color = "GBIV".toCharArray();
        n -= 3;
        for(int i = 0; i<n; i++)
            out.print(color[i%4]);
        /*
        char[] color = "ROYGBIV".toCharArray();
        StringBuilder result = new StringBuilder(n);
        int k = (int)Math.floor(n/7);//(int)(n/7-0.5)
        for(int i = 0; i < k; i++)
            result.append(color);
        k = n%7;
        if(k!=0){
            int from = 4 - k/2;
            int to = k - from + k%2;
        }
        */

    }
}

import java.util.Scanner;

/**
 * TODO Put here a description of what this class does.
 *
 * @author songm.
 *         Created Oct 14, 2013.
 */
public class EasterEggs {

    /**
     * TODO Put here a description of what this method does.
     *
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub.
        Scanner scanner = new Scanner(System.in);
        String num = scanner.nextLine();

        int eggs = Integer.parseInt(num);
        num = "ROY";
        while(num.length()<eggs){
            num+="GBIV";
        }

        System.out.println(num.substring(0,eggs));

    }

}

import java.util.*;

public class A{
		static int MaxN=(int)1e6;
static Scanner scan=new Scanner(System.in);
static int [] reverse(int a[], int n)
    {
        int[] b = new int[n];
        int j = n;
        for (int i = 0; i < n; i++) {
            b[j - 1] = a[i];
            j = j - 1;
        }
return b;
         }
static int []ret(int ar[]){

int bol[]=new int[MaxN];
Arrays.fill(bol,-1);
  for (int i : ar) {
      bol[i] = 1;
    }
return bol;
}
public static void main(String[] args)
{
	int n=scan.nextInt();
	String s="";
if(n==7){
	s+="ROYGBIV";

System.out.println(s);
return;
}

	if(n%7==0){
	for(int i=0;i<n;i+=7){
s+="ROYGBIV";

	}
	System.out.println(s);
return;
}
	else {
		int mod=n%7;
		n=n-mod;
		for(int i=0;i<n;i+=7){
			s+="ROYGBIV";
		}
		if(mod==1)
		s+="G";
	else if(mod==2)
		s+="GB";
	else if(mod==3)
		s+="GBI";
	else if(mod==4)
		s+="GBIV";
	else if(mod==5)
		s+="OYGBI";
	else if(mod==6)
		s+="GBIVYG";

		System.out.println(s);
		return;

	}}

}

import java.util.*;

public class judge {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int length = scanner.nextInt();
        String[] colors = new String[]{"R", "O", "Y", "G", "B", "I", "V"};
        StringBuilder str = new StringBuilder();
        int counter = 0;

        for (int i = 0; i < length; i++) {
            str.append(colors[counter++]);
            if (counter == 7)
                counter = 3;
        }

        System.out.println(str);

    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class B_70 {
    public static void main(String[] args) {
        try {
            BufferedReader input = new BufferedReader(new InputStreamReader(
                    System.in));
            String line = input.readLine();
            char[] colors = { 'R', 'O', 'Y', 'G', 'B', 'I', 'V' };
            int numEggs = Integer.parseInt(line);
            int dived7 = numEggs / 7;
            StringBuilder eggsColour = new StringBuilder();
            for (int i = 0; i < (dived7 * 7); i++) {
                eggsColour.append(colors[i % 7]);
            }

            int ostatak = (numEggs % 7);

            int start = 0;
            if (ostatak != 0) {

                switch (ostatak) {
                case 1:
                case 2:
                case 3:
                case 4:
                    start = 3;
                    break;
                case 5:
                case 6:
                    start = 0;
                    break;

                default:
                    break;
                }

                for (int i = start, j = 0; j < (numEggs - (dived7 * 7)); j++, i++) {
                    eggsColour.append(colors[i % 7]);
                }

            }

            System.out.println(eggsColour.toString());
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        String x = "ROYGBIV";
        for (int i = 7; i < n; ++i)
            x += x.charAt(i - 4);
        System.out.println(x);
    }
}

import java.util.Scanner;

public class EasterEggs {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int count = sc.nextInt();

        char colors[] = {'R','O','Y','G', 'B','I','V'};
        String res= "";
        for (int i = 0; i < count ; i++) {
            if(i%2==0)
                res+= colors[i%7];
            else
                res = colors[i%7] + res;

        }

        System.out.println(res);

    }
}

import java.util.Scanner;

/**
 *
 * @author vinay.julme
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        in = null;
        String iniStr = "ROYG";
        StringBuffer strBuf = new StringBuffer();
        for(int ii = 0; ii < (n-3)/4; ii++)
            strBuf.append(iniStr);
        //for(int ii=strBuf.length(); ii < n-3; ii++)
        strBuf.append(iniStr.substring(0, (n-3)%4));
        strBuf.append("BIV");
        /*String str = "GBIV";
        for(int ii = 0; ii < n -3; ii++) {
            strBuf.append(str.charAt(ii%4));
        }*/
        System.out.println(strBuf);
    }

}

import java.util.Scanner;

public class Main
{
	public static void main(String[] args) {

		String str = "ROYGBIV";

		Scanner in =new Scanner(System.in);

		int n = in.nextInt();

		for (int i=7;i<n;i++){

		    str = str+str.charAt(str.length()-4);

		}

		System.out.println(str);

	}
}

import java.util.*;

public class cf78b {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);
        String d = "ROYGBIV";
        StringBuilder f = new StringBuilder();
        int n = input.nextInt();
        int q = n / 7;
        for (int i = 0; i < q; i++) {

            f.append(d);

        }

        n = n - (q * 7);

        if (n == 0) System.out.println(f);
        else if (n == 1) {
            f.append('G');
            System.out.println(f);
        } else if (n == 2) {
            f.append("GB");
            System.out.println(f);
        }
         else if (n == 3) {
            f.append("YGB");
            System.out.println(f);
        }
         else if (n == 4) {
            f.append("YGBI");
            System.out.println(f);
        }
         else if (n == 5) {
            f.append("OYGBI");
            System.out.println(f);
        }
         else if (n == 6) {
            f.append("OYGBIV");
            System.out.println(f);
        }

    }

}

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class EasterEggs {
	public static void main(String[] args) {
		out = new PrintWriter(new BufferedOutputStream(System.out));
		Reader in = new Reader();
		int n = in.readInt();
		char[] a = {'R', 'O', 'Y', 'G', 'B', 'I', 'V'};
		char[] s = new char[n];
		for(int i = 0; i < n; i++){
			if(i < 7) {
				s[i] = a[i % 7];
				out.print(a[i % 7]);
			}else{
				s[i] = s[i - 4];
				out.print(s[i]);
			}
		}
		in.close();
		out.close();
	}
	static PrintWriter out;
	static class Reader {
		BufferedReader br;
		StringTokenizer st;
		public Reader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		String read() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
		int readInt() {
			return Integer.parseInt(read());
		}
		long readLong() {
			return Long.parseLong(read());
		}
		double readDouble() {
			return Double.parseDouble(read());
		}
		char readChar() {
			return read().charAt(0);
		}
		int[] readIntArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = readInt();
			return a;
		}
		long[] readLongArray(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = readLong();
			return a;
		}
		double[] readDoubleArray(int n) {
			double[] a = new double[n];
			for (int i = 0; i < n; i++)
				a[i] = readDouble();
			return a;
		}
		String[] readStringArray(int n) {
			String[] s = new String[n];
			for (int i = 0; i < n; i++)
				s[i] = read();
			return s;
		}
		char[] readCharArray(int n) {
			char[] ch = new char[n];
			for (int i = 0; i < n; i++)
				ch[i] = readChar();
			return ch;
		}
		String readLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
		void close() {
			try {
				br.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}
}

import java.util.Scanner;

public class p8 {
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int num=n/7;
        int rem=n%7;
        StringBuilder str=new StringBuilder();
        for(int i=0;i<num;i++){
            str.append("ROYGBIV");
        }
        if(rem==1){
            str.append("G");
        }
        else if(rem==2){
            str.append("GB");
        }
        else if(rem==3){
            str.append("YGB");
        }
        else if(rem==4){
            str.append("YGBI");
        }
        else if(rem==5){
            str.append("OYGBI");
        }
        else if(rem==6){
            str.append("OYGBIV");
        }
        System.out.println(str);
    }
}

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] first = new int[30];
        int[] last = new int[30];
        char[] charInput = {'R', 'O', 'Y', 'G', 'B', 'I', 'V'};
        String result = "ROYGBIV";
        for (int i = 0; i < 7; i++) {
            first[charInput[i] - 'A'] = i;
            last[charInput[i] - 'A'] = i;
        }

        for (int i = 7; i < n; i++) {
            for (int j = 0; j < 7; j++) {
                int lastIndx = last[charInput[j] - 'A'], firstIndx = first[charInput[j] - 'A'];
                boolean flag = true;
                if (i - lastIndx < 4)
                    flag = false;
                if ((n - i) +firstIndx < 4)
                    flag = false;
                if (flag)
                {
                    last[charInput[j] - 'A'] = i;
                    result+=charInput[j];
                    break;
                }
            }
        }
        System.out.println(result);
    }
}

import java.io.*;
import java.math.BigInteger;
import java.util.Locale;
import java.util.Random;
import java.util.StringTokenizer;

public class D implements Runnable {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        new Thread(null, new D(), "", 128 * (1L << 20)).start();

    }

    void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);

        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();

            init();
            solve();

            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    String readString() throws IOException {

        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    String readString(String s) throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine(), s + "\n \t");
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }
    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    int readInt(String s) throws IOException {
        return Integer.parseInt(readString(s));
    }
    boolean isPrime(int a) throws IOException {
        int del=0;
        if(a==2){
            return false;
        }
        for(int i=2;i<Math.sqrt(a)+1;i++){
            if(a%i==0){
                del=i;
                break;
            }
        }
        if(del>0){
            return false;
        }
        else return true;
    }

    public BigInteger bigFactorial(int num) throws IOException {
        BigInteger fact = new BigInteger("1");
        BigInteger i = new BigInteger("1");
        BigInteger one = new BigInteger("1");
        for (int j=0;j<num;j++) {
            fact = fact.multiply(i);
            i=i.add(one);
//out.println(fact.toString()+" "+i.toString());
        }
//fact = fact.add(one);

        return fact;
    }

    public long factorial(int num) throws IOException{
        long res=1;
        for(int i=2;i<=num;i++){
            res*=i;
        }
        return res;
    }

    public int[] readIntArr(int n) throws IOException{
        int[] a = new int[n];
        for(int i=0;i<n;i++){
            a[i] = readInt();
        }
        return a;
    }

    public double formatDouble(double d, int dz)
    {
        double dd=Math.pow(10,dz);
        return Math.round(d*dd)/dd;
    }

    public class Pair implements Comparable{
        int a1;
        int a2;

        public int getA1() {
            return a1;
        }

        public int getA2() {
            return a2;
        }

        public void setA1(int a1) {
            this.a1 = a1;
        }

        public void setA2(int a2) {
            this.a2 = a2;
        }

        @Override
        public int compareTo(Object a) {
            Pair b=(Pair) a;
            if(this.a1>((Pair) a).a1){
                return -1;
            }
            if(this.a1==((Pair) a).a1)
                return 0;
            return 1;
        }
    }

    public class Triple implements Comparable{
        int a1;
        int a2;
        int a3;

        public int getA1() {
            return a1;
        }

        public void setA1(int a1) {
            this.a1 = a1;
        }

        public int getA2() {
            return a2;
        }

        public void setA2(int a2) {
            this.a2 = a2;
        }

        public int getA3() {
            return a3;
        }

        public void setA3(int a3) {
            this.a3 = a3;
        }
        @Override
        public int compareTo(Object a) {
            Triple b=(Triple) a;
            if(this.a1>((Triple) a).a1){
                return -1;
            }
            if(this.a1==((Triple) a).a1)
                return 0;
            return 1;
        }
    }

    public static long kth(int l, int r, int k, long[] array) {
        int i = l;
        int j = r;
        long x = array[l + random.nextInt(r - l + 1)];
        while (i <= j) {
            while (array[i] < x) {
                i++;
            }
            while (array[j] > x) {
                j--;
            }
            if (i <= j) {
                long temp = array[i];
                array[i] = array[j];
                array[j] = temp;
                i++;
                j--;
            }
        }
        //1-ый блок
        if (l <= k && k <= j) {
            return kth(l, j, k, array);
        }
        //2-ой блок
        if (i <= k && k <= r) {
            return kth(i, r, k,array);
        }
        //если k во втором блоке, возвращаем непосредственно a[k]
        return array[k];
    }

    public static Random random = new Random();

    static void swap(int[] a, int i, int j) {
        int t = a[i];
        a[i] = a[j];
        a[j] = t;
    }

    void solve() throws IOException{
        int n=readInt();
        int m=n-3;
        String a = "ROYG";
        String b="BIV";
        int povt=m/4;
        StringBuilder sb=new StringBuilder("");
        for(int i=0;i<povt;i++){
            sb.append(a);
        }
        sb.append(b);
        int kol=m%4;
        sb.append(a.substring(4-kol));
        System.out.println(sb.toString());

    }

    public long fn() throws IOException{
        return 0;
    }
    int pow(long x){
        int pow = 0;
        while (x > 0){
            x <<= 1;
            pow++;
        }
        pow--;
        return pow;
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;

public class Task078B {

    public static void main(String... args) throws NumberFormatException,
            IOException {
        Solution.main(System.in, System.out);
    }

    static class Scanner {

        private final BufferedReader br;
        private String[] cache;
        private int cacheIndex;

        Scanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
            cache = new String[0];
            cacheIndex = 0;
        }

        int nextInt() throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return Integer.parseInt(cache[cacheIndex++]);
        }

        int nextInt(int radix) throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return Integer.parseInt(cache[cacheIndex++], radix);
        }

        long nextLong() throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return Long.parseLong(cache[cacheIndex++]);
        }

        double nextDouble() throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return Double.parseDouble(cache[cacheIndex++]);
        }

        String next() throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return cache[cacheIndex++];
        }

        void close() throws IOException {
            br.close();
        }

    }

    static class Solution {

        public static void main(InputStream is, OutputStream os)
                throws NumberFormatException, IOException {
            PrintWriter pw = new PrintWriter(os);
            Scanner sc = new Scanner(is);

            int n = sc.nextInt();

            String pattern = "ROYGBIV";

            for (int i = 0; i < n / 7; i++) {
                pw.print(pattern);
            }

            switch (n % 7){
                case 1:
                    pw.println("G");
                    break;
                case 2:
                    pw.println("GB");
                    break;
                case 3:
                    pw.println("GBI");
                    break;
                case 4:
                    pw.println("GBIV");
                    break;
                case 5:
                    pw.println("YGBIV");
                    break;
                case 6:
                    pw.println("OYGBIV");
                    break;
            }

            pw.flush();
            sc.close();
        }
    }

}

import java.util.Scanner;

public class lol {
       public static void main(String args[]){
		Scanner l=new Scanner(System.in);
                int f=l.nextInt();
                String ff[]={"R","O","Y","G","B","I","V"};
                String h="";
                                    int c=0;
                 for (int i = 0; i < f; i++) {
              if(ff.length==i){
              i=3;
              }
              c++;

                 h+=ff[i];
                  if(c==f){
              i=1000;
              }

           }

               System.out.println(h);

       }
}

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 *
 * @author moham
 */

public class JavaApplication1 {

public static void main(String[] args) {
Scanner s=new Scanner(System.in);
int x=s.nextInt();
char colors[]={'R','O','Y','G','B','I','V'};
String line="ROYGBIV";
if(x>7)
{

int job=3;
for(int point=7;point<x;point++)
{
    if (job==7)job=3;
    line=line+colors[job++];
}
}
    System.out.println(line);
    }

}

import java.awt.List;
import java.io.*;
import java.math.BigInteger;
import java.util.*;

import javax.swing.text.html.HTMLDocument.Iterator;

public class Main {

		private BufferedReader input;
		private PrintWriter output;
		private StringTokenizer stoken;

		String fin = "input";
		String fout = "output";

		int max = 0;
		String[] group;

		private void solve() throws IOException {

			/*
			boolean key = true;

			int count = 0;

			String st = input.readLine().trim();
			for (int i = 0; i<st.length(); i++) {
				if (st.charAt(i) == 'a' || st.charAt(i) == 'e' || st.charAt(i) == 'i' || st.charAt(i) == 'o' || st.charAt(i) == 'u') count++;
			}
			if (count != 5) key = false;

			if (key) {

				st = input.readLine().trim();
				count = 0;
				for (int i = 0; i<st.length(); i++) {
					if (st.charAt(i) == 'a' || st.charAt(i) == 'e' || st.charAt(i) == 'i' || st.charAt(i) == 'o' || st.charAt(i) == 'u') count++;
				}
				if (count != 7) key = false;

				if (key) {

					st = input.readLine().trim();
					count = 0;
					for (int i = 0; i<st.length(); i++) {
						if (st.charAt(i) == 'a' || st.charAt(i) == 'e' || st.charAt(i) == 'i' || st.charAt(i) == 'o' || st.charAt(i) == 'u') count++;
					}
					if (count != 5) key = false;

				}

			}

			if (!key) {
				output.print("NO");
			} else {
				output.print("YES");
			}
			*/

			int n = nextInt();

			String st = "ROYGBIV";

			String res = "";

			int k = n / 7;

			for (int i=0; i<k; i=i+1) {
				res = res + st;
			}

			k = n - k*7;

			if (k == 1) res += "G";
			if (k == 2) res += "GB";
			if (k == 3) res += "GBI";
			if (k == 4) res += "GBIV";
			if (k == 5) res += "ROYGB";
			if (k == 6) res += "ROYGBI";

			//res = res.substring(0, n);
/*
			if (res.charAt(0) == res.charAt(n-1)) {
				res = res.substring(0, n-1) + res.charAt(3);
			}
	*/
			output.print( res );

		}

		Main() throws IOException {
				//input = new BufferedReader(new InputStreamReader(System.in));
				//output = new PrintWriter(System.out);

				//input = new BufferedReader(new FileReader(fin + ".txt"));
				//output = new PrintWriter(new FileWriter(fout + ".txt"));

				//input = new BufferedReader(new FileReader(fin + ".txt"));
				input = new BufferedReader(new InputStreamReader(System.in));
				output = new PrintWriter(System.out);

				solve();

				input.close();

				output.flush();
				output.close();
		}

		int nextInt() {
				return Integer.parseInt(nextToken());
		}

		int nextIntegerer() {
			return 0;
		}

		long nextLong() {
				return Long.parseLong(nextToken());
		}

		double nextFloat() {
				return Float.parseFloat(nextToken());
		}

		double nextDouble() {
				return Double.parseDouble(nextToken());
		}

		String nextToken() {
				while ((stoken == null) || (!stoken.hasMoreTokens())) {
						try {
								String line = input.readLine();
								stoken = new StringTokenizer(line);
						} catch (IOException e) {
								e.printStackTrace();
						}
				}
				return stoken.nextToken();
		}

		public static void main(String[] args) throws IOException {
				new Main();
		}

}

import java.util.*;

public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String s ="";
		s+="ROYGBIV";
		if(n==8) System.out.println("ROYGBIVG");
		else if(n==9) System.out.println("ROYGBIVGB");
		else if(n==10) System.out.println("ROYGBIVGBI");
		else {
		for(int i=1;i<=(n-7)/4;i++) {
			s+="ROYG";
		}
		char[] c = {'B','I','V'};
		for(int i=0;i<(n-7)%4;i++) {
			s+=c[i];
		}
		System.out.println(s);}
	}
}

import java.util.*;
public class B78 {

	public static void main(String args[]){

		Scanner input = new Scanner (System.in);

		int n = input.nextInt();
		int a[] = new int[300];

		char c[] = "0ROYGBIV".toCharArray();

		Arrays.fill(a, 0);

		for(int i = 0; i<7;i++){
		a[i]=i+1;
		a[n+i]=i+1;
		}

		for(int i = 7 ; i<n;i++){

			int k = 1;
			while(k<=7){
				boolean flag = true;
				for(int j = i-1;j>i-4 && j>=0;j--){
					if (a[j]==k) {
						flag = false;
						break;
					}
				}
				for(int j = i+1;j<i+4 ;j++){
					if (a[j]==k) {
						flag = false;
						break;
					}
				}
				if (flag){
					a[i]=k;
					a[i+n]=k;
					break;
				}
				k++;
			}
			//System.out.println(a[i]);
		}

		String out="";
		//for(int i = 0; i<n; i++) System.out.print(a[i]+" ");
		for(int i = 0; i<n; i++) out = out+c[a[i]];
		System.out.println(out);
	}

}

// package main;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int sizee = scanner.nextInt();
        ArrayList<String> arr = new ArrayList<>(Arrays.asList("R", "O", "Y", "G", "B", "I", "V"));
        ArrayList<String> arrAfter = new ArrayList<>(Arrays.asList("R", "O", "Y", "G"));
        ArrayList<String> arrBefore = new ArrayList<>(Arrays.asList("G", "B", "I", "V"));
        String answer = "ROYGBIV";

        for (int i = 7; i < sizee; i++) {
            answer += arrBefore.get(0);
            arrBefore.add(arrBefore.get(0));
            arrBefore.remove(0);
        }

        System.out.println(answer);
    }
}

import java.util.*;
public class Main
{

    public static void main(String args[])
    {
        Scanner sc=new Scanner(System.in);
        char c[]={'V','I','B','G','Y','O','R'};
        int n=sc.nextInt();
        int i=0;
        StringBuffer s=new StringBuffer();
        int j=0;
        for(i=0;i<n;i++)
        {
            j=j%7;
            s.insert(i,c[j]);
            j++;
        }
        String str=s.toString();
        if(str.charAt(n-1)=='V')
        {
            s.setCharAt(n-1,'G');
        }
        else if(str.charAt(n-1)=='I')
        {
            s.setCharAt(n-1,'Y');
            s.setCharAt(n-2,'G');
        }
        else if(str.charAt(n-1)=='B')
        {
            s.setCharAt(n-1,'O');
            s.setCharAt(n-2,'Y');
            s.setCharAt(n-3,'G');
        }
        System.out.println(s);

    }
}

/**
 * Created by IntelliJ IDEA.map.values()
 * User: shakhov
 * Date: 15.06.2011
 * Time: 15:22:46
 * To change this template use File | Settings | File Templates.
 */

import java.util.*;
import java.io.*;

public class CodeForces2A {
	public void solve() throws IOException {
		int n=nextInt();
		char colors[]={'R','O','Y','G','B','I','V'};
		List<Character> res=new ArrayList<Character>();
		res.add(colors[4]);
		res.add(colors[5]);
		res.add(colors[6]);
		for(int i=3;i<n;i++){
			res.add(colors[i%4]);
		}
		for(Character c:res){
			out.print(c);
		}

	}

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			// in = new BufferedReader(new FileReader("input.txt"));
			// out = new PrintWriter("output.txt");
			// long t=new Date().getTime();
			solve();
			// System.out.println(new Date().getTime()-t+"ms");
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			out.flush();
		}
	}

	private BufferedReader in;
	PrintWriter out;
	private StringTokenizer st;

	public static void main(String[] arg) {
		Locale.setDefault(Locale.US);
		new CodeForces2A().run();
	}

	private String next() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			String rl = in.readLine();
			if (rl == null)
				return null;
			st = new StringTokenizer(rl);
		}
		return st.nextToken();
	}

	private int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	private long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	private double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Easter_Eggs {
     static String[] arr = {"","G","GB","YGB","YGBI","OYGBI","OYGBIV"};
     static boolean [] check = new boolean[7];
     public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.flush();
    }
     static class TaskA{
        void solve(int test , InputReader in , PrintWriter out){
         int n = in.nextInt();
         int mod = 1;
         int x = 0;
            for (int i = 0; i < n/7; i++) {
                    out.print("ROYGBIV");
            }
//            n =(int) Math.ceil(n/7
            out.print(arr[n%7]);
     }
     }
       static class InputReader{
       public BufferedReader reader;
       public StringTokenizer tk;
       public InputReader(InputStream stream){
           reader = new BufferedReader(new InputStreamReader(stream));
           tk = null;
       }
       String next(){
           while (tk == null || !tk.hasMoreTokens()) {
               try{
                   tk = new StringTokenizer(reader.readLine());
               }
               catch(IOException e){
                   throw new RuntimeException();
               }
           }
           return tk.nextToken();
       }
       int nextInt(){
           return Integer.parseInt(next());
       }
   }
}

import java.util.Scanner;
public class problem78B {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        in.close();
        String palette = "ROYGBIV";
        String ans = palette;
        for (int i = 7; i < n; i++)
            ans = ans + palette.substring(3).charAt((i - 7) % 4);
        System.out.println(ans);
    }
}

import java.util.*;
import java.util.Scanner;

public class Easter_Egg {

     public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    int number = sc.nextInt();
    String rgbs= "ROYGBIV";

   for (int i = 0; i < number -7; i++)
    rgbs += "" + rgbs.charAt((i%4)+3); // correct at tested

    System.out.println(rgbs);

    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String color = "ROYGBIV";
        String eggs = "";
        if (n <= 7) {
            eggs = color.substring(0, n);
        } else {
            eggs = color;
            for (int i = 7; i < n && (n-eggs.length() >= 4); i = i + 4) {
                eggs = eggs + color.substring(3, 7);
            }
        }
        if (eggs.length() < n) {
            eggs = eggs + color.substring(3,3+ (n - eggs.length()));

        }
        System.out.println(eggs);

    }

}

import com.sun.source.tree.WhileLoopTree;

import java.io.*;
import java.util.*;
public class CP {
    static long startTime;
    static long endTime;
    static Boolean [] prime ;
    static Scanner sc = new Scanner(System.in);
    static class FastReader{
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    public static int lowerBound
    (Integer[] array, int length, int value) {
        int l = 0;
        int r = length;
        while (l < r) {
            int mid = (l + r) / 2;
            if (value < array[mid]) {
                r = mid;
            } else {
                l = mid + 1;
            }
        }
        return l;
    }
    public static long gcd(long a, long b){
        if (b == 0)
            return a;
        else return gcd(b, a % b);
    }
    public  static  long countDivs(long n ){
        int cn=0;
        long sqr = (long)Math.sqrt(n);
        for (long i = 1; i<=sqr ; ++i) {
            if(n%i==0){
                ++cn;
            }
        }
        cn*=2;
        if(sqr*sqr==n) cn--;
        return cn;

    }
    static void prime(int  x) {
        //sieve algorithm. nlog(log(n)).
        prime=new Boolean[ (x+1)];
        Arrays.fill(prime,true);
        prime[0] = prime[1] = false;
        for (int  i = 2; i * i <= x ; i++)
            if (prime[i])
                for (int  j = i * i; j <= x; j += i)
                    prime[j] = false;
    }
    static int[] sum;
    static void cumulitiveSum( int [] arr){
        sum = new int[arr.length];
        sum[0]=arr[0];
        for (int i = 1; i <arr.length; i++) {
            sum[i]=arr[i]+sum[i-1];
        }
    }
    static boolean isEven(long x ){
        return x % 2 == 0;
    }
    static boolean isPrime(long x ){
        boolean flag = true;
        int sqr = (int)Math.sqrt(x);
        if(x<2) return false;
        for (int i = 2; i <=sqr; i++) {
            if(x%i==0){
                flag=false;
                break;
            }
        }
        return flag;
    }
    public static void main(String [] args)  {
        startTime = System.currentTimeMillis();
     //  int T = sc.nextInt();while (T--!=0)
        {
            solve();
        }
        endTime = System.currentTimeMillis();
        long duration= endTime-startTime;
        //System.out.println(duration);
    }
    public static void solve()  {
//////////////////////////////////////////////////////////////////////
        int n =sc.nextInt();
        String s="IBG";
        String s1="VRO";
        int rep = n/7;
        n=n%7;
        while(rep--!=0)
        System.out.print("GBIVROY");
        String res="VROYVR";
        int i=0;
        while(n--!=0){
            System.out.print(res.charAt(i));
            i++;
        }
///////////////////////////////////////////////////////////////////////
    }

}

import java.util.Scanner;

public class EasterEggs {
	public static void main (String arg[]){
		Scanner s =new Scanner(System.in);
		int n=s.nextInt();
		char[]arr={'G','B','I','V'};
		String ans="ROY";
		for(int i=3;i<n;i++)
			ans+=arr[i%4];
		System.out.println(ans);
	}
}

import java.io.*;
import java.math.*;
import java.util.*;

/**
 * @author Alexey Safronov (safronov.aa@gmail.com)
 */
public class B {
	private InputReader in;
	private PrintWriter out;

	private char color(int a) {
		if(a == 0) {
			return 'R';
		} else if(a == 1) {
			return 'O';
		} else if(a == 2) {
			return 'Y';
		} else if(a == 3) {
			return 'G';
		} else if(a == 4) {
			return 'B';
		} else if(a == 5) {
			return 'I';
		} else if(a == 6) {
			return 'V';
		} else {
			return '-';
		}
	}

	private void solve() {
		int N = in.readInt();

		int[] colors = new int[N];
		Arrays.fill(colors, -1);
		colors[0] = 0;

		for(int i = 0; i < 4; i++) {
			colors[i] = i;
		}

		for(int i = N - 3; i < N; i++) {
			colors[i] = 4 + i - (N - 3);
		}

		for(int i = 4; i < N - 3; i++) {
			boolean[] pick = new boolean[7];

			for(int j = i - 3; j <= i + 3; j++) {
				int index = j;

				if(index < 0) {
					while(index < 0) {
						index += N;
					}
				} else if(index >= N) {
					index %= N;
				}

				if(colors[index] >= 0) {
					pick[colors[index]] = true;
				}
			}

			int min_color = -1;

			for(int j = 0; j < 7; j++) {
				if(!pick[j]) {
					min_color = j;
					break;
				}
			}

			colors[i] = min_color;
		}

		for(int i = 0; i < N; i++) {
			out.print(color(colors[i]));
		}
		out.print("\n");

	}

	public static void main(String[] args) {
		new B().run();
	}

	private B() {
		try {
//			System.setIn(new FileInputStream("input.txt"));
//			System.setOut(new PrintStream(new FileOutputStream("output.txt")));
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
		in = new InputReader(System.in);
		out = new PrintWriter(System.out);
	}

	private void run() {
		//int tests = in.readInt();
		//for(int test = 1; test <= tests; ++test)
				solve();

		exit();
	}

	private void exit() {
		out.close();
		System.exit(0);
	}

	private static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar, numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int readInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long readLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public String readString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuffer res = new StringBuffer();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private String readLine0() {
			StringBuffer buf = new StringBuffer();
			int c = read();
			while (c != '\n' && c != -1) {
				if (c != '\r')
					buf.appendCodePoint(c);
				c = read();
			}
			return buf.toString();
		}

		public String readLine() {
			String s = readLine0();
			while (s.trim().length() == 0)
				s = readLine0();
			return s;
		}

		public String readLine(boolean ignoreEmptyLines) {
			if (ignoreEmptyLines)
				return readLine();
			else
				return readLine0();
		}

		public BigInteger readBigInteger() {
			try {
				return new BigInteger(readString());
			} catch (NumberFormatException e) {
				throw new InputMismatchException();
			}
		}

		public char readCharacter() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			return (char) c;
		}

		public double readDouble() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.') {
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, readInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.') {
				c = read();
				double m = 1;
				while (!isSpaceChar(c)) {
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, readInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}
	}
}

import java.io.*;
import java.util.*;
import static java.lang.Math.*;

public class BetaRound70_B implements Runnable {

	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok = new StringTokenizer("");

	void init() throws IOException {
		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
	}

	String readString() throws IOException {
		while (!tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}

	@Override
	public void run() {
		try {
			long t1 = System.currentTimeMillis();
			init();
			Locale.setDefault(Locale.US);
			solve();
			out.close();
			long t2 = System.currentTimeMillis();
			System.err.println("Time = " + (t2 - t1));
		} catch (Exception e) {
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}

	public static void main(String[] args) {
		new Thread(new BetaRound70_B()).start();
	}

	char[] c = "ROYGBIV".toCharArray();

	void solve() throws IOException {
		int n = readInt();
		int p = 0;
		for (int i = 1; i <= n-3; i++) {
			out.print(c[p]);
			p++;
			p %= 4;
		}
		out.print("BIV");
	}

}

import java.util.Scanner;

public class Solution {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();

        String[] arr = {"G", "B", "I", "V"};

        int index = 0;
        System.out.print("ROY");
        for (int i = 0; i < n - 3; i++) {
            index = i % 4;

            System.out.print(arr[index]);

        }

    }

}

import java.util.Scanner;
public class acm
{
public static void main(String[] args)
{

	Scanner in=new Scanner(System.in);
	int n =in.nextInt();
	int first[]=new int [30];
	int last[]=new int [30];
	String res="ROYGBIV";
	for(int i=0;i<7;i++){
		first[res.charAt(i)-'A']=i;last[res.charAt(i)-'A']=i;}
	for(int i=7;i<n;i++)
	{

	for(int j=0;j<7;j++)
	{

		int ix1=last[res.charAt(j)-'A'];
		int ix2=first[res.charAt(j)-'A'];
		boolean f =true ;
		if(i-ix1+1<=4)
			f=false;
		if((n-i)+(ix2+1)<=4)
			f=false;

		if(f)
		{

			last[res.charAt(j)-'A']=i;
			res+=res.charAt(j);
			break;

		}

	}

	}
	System.out.println(res);

}
}

import javax.print.DocFlavor;
import java.util.Scanner;

public class Main {
    private static Scanner in = new Scanner(System.in);

    public static void main(String[] args) {
        // write your code here
        int n = in.nextInt();
        String completeString = "ROYGBIV";
        String inCompleteString = "GBIVGB";
        int x = n % 7;
        int y = n / 7;
        for (int i = 0; i < y; i++) {
            System.out.print(completeString);
        }
        if (x > 0) {
            for (int i = 0; i < x; i++) {
                System.out.print(inCompleteString.charAt(i));
            }
        }
    }
}

/* @@@@@@@@@@@@@@@@@@@@@@@
 * @@@ Doston Akhmedov @@@
 * @@@@@@@@@@@@@@@@@@@@@@@
 */

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Locale;
import java.util.StringTokenizer;

public class r_70_b {
	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;

	public static void main(String[] args) throws IOException {
		Locale.setDefault(Locale.US);
		br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
				System.out)));

		int n=nextInt();
		char a[]={'R','O','Y','G','B','I','V'},b[]=new char[n+1];
		int k=0;
		for (int i = 1; i <=n/7*7; i++) {
			b[i]=a[k++];
			if(k==7)
				k=0;
		}
		int mod=n%7;
//		if(mod<=1)
//			mod++;
//		if(mod==3||mod==4)
//			mod=2;
//		if(mod==5)
//			mod=0;
		if(mod>=4)
			mod=0;
		else
			mod=2;
		for (int i = n/7*7+1; i <=n; i++) {
			if(mod+1>=7)
				mod=0;
			b[i]=a[++mod];
		}
		for (int i = 1; i <=n; i++) {
			pw.print(b[i]);
		}
		pw.close();
	}

	private static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	private static long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	private static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	private static String next() throws IOException {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

public class B {
	public static BufferedReader in;
	public static PrintWriter out;

	public static void main(String[] args) throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);

		boolean showLineError = true;
		if (showLineError) {
			solve();
			out.close();
		} else {
			try {
				solve();
			} catch (Exception e) {
			} finally {
				out.close();
			}
		}

	}

	static void debug(Object... os) {
		out.println(Arrays.deepToString(os));
	}

	private static void solve() throws IOException {
		int n = Integer.parseInt(in.readLine());
		Map<Integer,Character> map = new HashMap<Integer,Character>();
		map.put(0, 'R');
		map.put(1, 'O');
		map.put(2, 'Y');
		map.put(3, 'G');
		map.put(4, 'B');
		map.put(5, 'I');
		map.put(6, 'V');

		char[] ret = new char[n];
		for(int i =0;i<n;i++)
			ret[i]=map.get(i%4);
		for(int i =n-1,j=6;i>=n-3;i--,j--)
			try {
				ret[i]=map.get(j);
			} catch (Exception e) {
			}
		out.println(new String(ret));
	}

}

import java.io.*;
import java.util.*;

public class EasterEggs implements Runnable {

		void solve() throws IOException {
			int n = nextInt();

			String s = "VIB";
			String st = "GYOR";
			int i = 0;
			while(i<4 && s.length()<n){
				s+=st.charAt(i);
				i++;
				i%=4;
			}
			writer.println(s);
         }

        BufferedReader reader;
        StringTokenizer tokenizer;
        PrintWriter writer;

        public void run() {
            try {
                reader = new BufferedReader(new InputStreamReader(System.in));
                writer = new PrintWriter(System.out);
                //reader = new BufferedReader(new FileReader("input.txt"));
                //writer = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
                tokenizer = null;
                solve();
                reader.close();
                writer.close();
            } catch (Exception e) {
                e.printStackTrace();
                System.exit(1);
            }
        }

        int nextInt() throws IOException {
            return Integer.parseInt(nextToken());
        }

        long nextLong() throws IOException {
            return Long.parseLong(nextToken());
        }

        double nextDouble() throws IOException {
            return Double.parseDouble(nextToken());
        }

        String nextToken() throws IOException {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                tokenizer = new StringTokenizer(reader.readLine());
            }
            return tokenizer.nextToken();
        }

        public static void main(String[] args) {
                new EasterEggs().run();
        }

}

import java.util.*;

public class judge {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int length = scanner.nextInt();
        String[] colors = new String[]{"R", "O", "Y", "G", "B", "I", "V"};
        StringBuilder str = new StringBuilder();
        int counter = 0;

        for (int i = 0; i < length; i++) {
            str.append(colors[counter++]);
            if (counter == 7)
                counter = 3;
        }

        System.out.println(str);

    }

}

import java.util.HashSet;
import java.util.Scanner;

public class B70 {

    public static String run(int n) {
        String pat = "ROYGBIV", res = "";
        int rep = n/7, rem = n%7;
        for (int i = 0; i < rep; i++)
            res += pat;
        String[] rems = {
                "",
                "G",
                "GB",
                "GBI",
                "GBIV",
                "ROYG",
                "ROYGB",
                "ROYGBI"
        };
        res += rems[rem];
        return res;
    }

    public static String run2(int n) {
        String pat = "ROYGBIV", res = "";
        int rep = n/7-1, rem = n%7;
        for (int i = 0; i < rep; i++)
            res += pat;
        String[] rems = {
                "ROYGBIV",
                "ROYGRBIV",
                "ROYGROBIV",
                "ROYGROYBIV",
                "ROYGROYGBIV",
                "ROYGBIVGBIVG",
                "ROYGBIVGBIVYG"
        };
        res += rems[rem];
        return res;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println(run2(in.nextInt()));
//      for (int i = 7; i <= 100; i++) {
//          String res = run(i);
//          boolean valid = true;
//          for (int j = 4; j < res.length(); j++) {
//              int st = j-4, end = j;
//              for (int k = st; k < end; k++) {
//                  for (int l = st; l < end; l++) {
//                      if (k == l) continue;
//                      if (res.charAt(k) == res.charAt(l)) {
//                          System.out.println("Case #" + i + ": Error (" + res + ")");
//                          valid = false;
//                          break;
//                      }
//                  }
//                  if (!valid) break;
//              }
//              if (!valid) break;
//          }
//          if (valid) {
//              HashSet<Character> set = new HashSet<Character>();
//              for (int j = 0; j < res.length(); j++) {
//                  set.add(res.charAt(j));
//              }
//              if (set.size() != 7) {
//                  valid = false;
//                  System.out.println("Case #" + i + ": Invalid (" + res + ")");
//              }
//          }
//          if (!valid) break;
//          else System.out.println("Case #" + i + ": Passed (" + res + ")");
//      }
    }
}

import java.util.*;

public class Main {
    static int a=0;static int b=0;static int cc=0;

    public static void main(String[] args) {
Scanner in=new Scanner(System.in);
 ArrayList<Character> ar=new ArrayList();
int x=in.nextInt();
String s="ROYGBIV";String g="GBIVGB";
for (int i=0;i<(x/7);i++){
    System.out.print(s);
}
String r=g.substring(0,(x%7));
System.out.print(r);

    }
}

public class B {
    public static void main(String[] args) {
        String[] c = { "R", "O", "Y", "G", "B", "I", "V" };
        n = new java.util.Scanner(System.in).nextInt();
        p = new int[n];
        f(0);
        for(int i = 0; i < n; ++i){
            System.out.print(c[p[i]-1]);
        }
        System.out.println();
    }

    static int n;
    static int[] p;
    static int[] bc = new int[8];

    static boolean f(int i) {
        if(i == n){
            for(int j = 1; j <= 7; ++j){
                if(bc[j] < 1){
                    return false;
                }
            }
            return true;
        }
        boolean[] b = new boolean[8];
        for (int d = -3; d <= 3; ++d) {
            int j = i + d;
            if(j >= n){
                j -= n;
            }else if(j < 0){
                j += n;
            }
            b[p[j]] = true;
        }
        for (int j = 1; j <= 7; ++j) {
            if (!b[j]){
                p[i] = j;
                ++bc[j];
                if(f(i + 1)){
                    return true;
                }
                --bc[j];
                p[i] = 0;
            }
        }
        return false;
    }
}

import java.util.*;
public class B78 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String s = "ROYGBIV";
        while (n>=7) {
            System.out.print(s);
            n-=7;
        }
        if (n==1) {
            System.out.println("G");
        }
        if (n==2) {
            System.out.println("GB");
        }
        if (n==3) {
            System.out.println("GBI");
        }
        if (n==4) {
            System.out.println("GBIV");
        }
        if (n==5) {
            System.out.println("GBYIV");
        }
        if (n==6) {
            System.out.println("GOBYIV");
        }
    }

}

import java.util.Scanner;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Ura
 */
public class _78B {

    public static String right3(String str, char[] charArr) {
        String res = "";
        int l = charArr.length;
        char[] tempArr = new char[3];

        int strN = str.length();
        char[] compareArr = new char[9];
        compareArr[0] = str.charAt(2);
        compareArr[1] = str.charAt(1);
        compareArr[2] = str.charAt(0);

        compareArr[6] = str.charAt(strN - 1);
        compareArr[7] = str.charAt(strN - 2);
        compareArr[8] = str.charAt(strN - 3);

        c:
        for (int i = 0; i < l; i++) {
            tempArr[0] = charArr[i];
            a:
            for (int j = 0; j < l; j++) {
                if (j != i) {
                    tempArr[1] = charArr[j];
                    b:
                    for (int k = 0; k < l; k++) {
                        if (k != i && k != j) {// тут то мы и получаем перестановки в количестве 7*6*5
                            tempArr[2] = charArr[k];

                            compareArr[3] = tempArr[0];
                            compareArr[4] = tempArr[1];
                            compareArr[5] = tempArr[2];
                            for (int ii = 3; ii <= 5; ii++) {
                                for (int jj = 0; jj < compareArr.length; jj++) {
                                    if (ii != jj && (jj >= ii - 3 && jj <= ii + 3)) {
                                        if (ii == 3 && compareArr[ii] == compareArr[jj]) {
                                            //     System.out.println("ii=" + ii + " jj=" + jj + "compareArr=" + new String(compareArr));
                                            continue c;
                                        }
                                        if (ii == 4 && compareArr[ii] == compareArr[jj]) {
                                            //      System.out.println("ii=" + ii + " jj=" + jj + "compareArr=" + new String(compareArr));
                                            continue a;
                                        }
                                        if (ii == 5 && compareArr[ii] == compareArr[jj]) {
                                            //        System.out.println("ii=" + ii + " jj=" + jj + "compareArr=" + new String(compareArr));
                                            continue b;
                                        }
                                    }

                                }
                            }
                            // res += tempArr[2] + tempArr[1] + tempArr[0];
                            res += new String(tempArr, 2, 1) + new String(tempArr, 1, 1) + new String(tempArr, 0, 1);
                            break c;

                        }
                    }
                }

            }
        }

        return res;
    }

    public static void main(String... args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();

        if (n > 9) {
            char[] charArr = {'R', 'O', 'Y', 'G', 'B', 'I', 'V'};
            int count = 0;
            String str = "";

            int count7 = 0;
            while (count < n - 3) {
                if (count7 > 7 - 1) {
                    count7 = 0;
                }
                str += charArr[count7++];

                count++;
            }
            System.out.print(str + right3(str, charArr));

        } else {
            if (n == 7) {
                System.out.print("ROYGBIV");

            }
            if (n == 8) {
                System.out.print("ROYGRBIV");

            }
             if (n == 9) {
                System.out.print("ROYGBIVYG");

            }
        }

    }
}

import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.FileReader;
import java.io.BufferedWriter;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.File;
import java.io.Writer;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author jarek
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        String c = "ROYGBIV";
        int n = in.nextInt();
        StringBuffer ans = new StringBuffer("");
        for (int i = 0; i < n / 7; ++i)
            ans.append(c);
        int rem = n % 7;
        if (rem > 0) {
            int l = Math.min(rem, 4);
            ans.insert(4, c.substring(0, l));
            if (rem > 4) {
                rem -= 4;
                ans.insert(4 + l, c.substring(0, rem));
            }
        }
        out.print(ans);
    }
}

class InputReader {
    BufferedReader br;
    StringTokenizer st;

    public InputReader(File f) {
        try {
            br = new BufferedReader(new FileReader(f));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    public InputReader(InputStream f) {
        br = new BufferedReader(new InputStreamReader(f));
    }

    public String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void close() {
        writer.close();
    }
}

import java.util.*;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        StringBuilder SB = new StringBuilder("ROYGBIV");
        int x = sc.nextInt()-7;
        int next=0;
        for(int a=0;a<x;a++){
            if(next%4==0)SB.append("G");
            else if(next%4==1)SB.append("B");
            else if(next%4==2)SB.append("I");
            else SB.append("V");
            next++;
        }
        System.out.print(SB.toString());
        System.exit(0);
    }
}

import java.util.*;
public class MyClass {
    public static void main(String args[]) {
      Scanner sc= new Scanner(System.in);
        int n=sc.nextInt();
        String str="ROYGBIV".repeat(n/7);
        int remainder = n%7;
        String arr[]={"", "G", "GB", "YGB", "YGBI", "OYGBI", "OYGBIV"};
        str+=arr[remainder];
      System.out.print(str);
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {
    private static StreamTokenizer in;
    private static PrintWriter out;
    private static BufferedReader inB;

    private static int nextInt() throws Exception{
        in.nextToken();
        return (int)in.nval;
    }

    private static String nextString() throws Exception{
        in.nextToken();
        return in.sval;
    }

    static{
        inB = new BufferedReader(new InputStreamReader(System.in));
        in = new StreamTokenizer(inB);
        out = new PrintWriter(System.out);
    }

    public static void main(String[] args)throws Exception{
        int n = nextInt();

        String ans = "";
        for(int i = 0; i<n/7; i++) {
            ans += "ROYGBIV";
        }

        char[] c = "GBIVGBI".toCharArray();

        for(int i = 0; i<n%7; i++) {
            ans += c[i];
        }

        System.out.println(ans);
    }
}

import java.io.*;
import java.util.StringTokenizer;

/**
 * @author Mohannad Elmagharby
 * on 3/20/2020
 */
public class B {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = scanner.nextInt();
        StringBuilder ans = new StringBuilder("ROYGBIV");
        int m=n;
        n-=7;
        while(n>0){
            ans.append("GBIV");
            n-=4;
        }
        out.append(ans.toString().substring(0,m));
        out.flush();
        out.close();
    }

    static class Scanner {
        StringTokenizer tokenizer;
        BufferedReader reader;

        public Scanner(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return reader.readLine();
        }

        public boolean ready() throws IOException {
            return reader.ready();
        }
    }
}

import java.util.*;

public class EasterEggs {

    public static void main(String[] args) {
        char[] colors = {'R', 'O', 'Y', 'G', 'B', 'I', 'V' };
        Scanner in = new Scanner(System.in);
        int numEggs = in.nextInt();
        int start = 0;

        for (int i = 0; i < numEggs; i++ ) {
                System.out.print(colors[(start+i)%7]);
                if((start+i)%7 == 6)
                        start += 3;
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
/*
 */
public class Main{
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);
//        int t=sc.nextInt();
//        outer:while (t-->=1) {
       int n=sc.nextInt();
       String ans="ROYGBIV";
       if (n>=8) {
           n-=7;

               for (int i = 3; i < ans.length()&&n>=1; i++) {
                   ans += ans.charAt(i % (ans.length()));
                   n--;
               }

       }
        System.out.println(ans);

       out.flush();

    }
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    static void sort(int[] a) {
        ArrayList<Integer> l=new ArrayList<>();
        for (int i:a) l.add(i);
        Collections.sort(l);
        for (int i=0; i<a.length; i++) a[i]=l.get(i);
    }

    static class Pair implements Comparable<Pair> {
        int num, val;

        public Pair(int a, int b) {
            num = a;
            val = b;
        }

        public int compareTo(Pair x) {
            return x.val-val;
        }
    }
    static int mod=(int)1e9+7;
    static long mod(long x){
        return ((x%mod+mod)%mod);
    }
    static long add(long x,long y){
        return mod(mod(x)+mod(y));
    }
    static long mul(long x,long y){
        return mod(mod(x)*mod(y));
    }
    static int[] find(int n,int start,int diff){
        int a[]= new int[n];
        a[0]=start;
        for (int i=1;i<n;i++)a[i]=a[i-1]+diff;
        return a;
    }
    static void swap(int a,int b){
        int c=a;
        a=b;
        b=c;
    }

    static void printArray(int a[]){
        for (int i=0;i<a.length;i++){
            System.out.print(a[i]+" ");
        }
    }
    static boolean sorted(int a[]){
        int n=a.length;
        boolean flag=true;
        for (int i=0;i<n-1;i++){
            if (a[i]>a[i+1])flag=false;
        }
        if (flag)return true;
        else  return false;
    }
    public static int findlog(long n){
        if(n == 0)
            return 0;

        if(n == 1)
            return 0;
        if(n == 2)
            return 1;
        double num = Math.log(n);
        double den = Math.log(2);
        if(den == 0)
            return 0;
        return (int)(num/den);
    }
    public static long gcd(long a,long b){
        if(b%a == 0)
            return a;
        return gcd(b%a,a);
    }
    public static int gcdInt(int a,int b){

        if(b%a == 0)
            return a;

        return gcdInt(b%a,a);

    }

    static void sortReverse(long[] a) {
        ArrayList<Long> l=new ArrayList<>();
        for (long i:a) l.add(i);
//        Collections.sort.(l);
        Collections.sort(l,Collections.reverseOrder());
        for (int i=0; i<a.length; i++) a[i]=l.get(i);
    }

    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long[] readArrayLong(long n) {
            long[] a=new long[(int)n];
            for (int i=0; i<n; i++) a[i]=nextLong();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

}

import java.util.Scanner;

public class EasterEggs {
    static StringBuilder outLeft = new StringBuilder();
    static StringBuilder outright = new StringBuilder();
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        String [] arr = {"R","O","Y","G","B","I","V"};
        for (int i = 0; i < n; i+=2) {
            outLeft.append(arr[i%7]);
        }
        for (int i = 1; i < n; i+=2) {
            outright.insert(0,arr[i%7]);
        }
        System.out.println(outLeft.append(outright));
    }

}

import java.io.*;

public class EasterEggs {

    private static final char[] c = { 'R', 'O', 'Y', 'G', 'B', 'I', 'V' };

    public static void main( String[] args ) throws Exception {
        BufferedReader br = new BufferedReader( new InputStreamReader( System.in ) );
        int n = Integer.parseInt( br.readLine() );
        StringBuilder buff = new StringBuilder();
        while ( n >= 7 ) {
            add(7, buff);
            n -= 7;
        }
        if ( n < 4 ) {
            StringBuilder sb = new StringBuilder();
            add(n, sb);
            buff.insert( buff.length() - 3, sb.toString() );
        } else {
            add(n, buff);
        }
        System.out.println( buff.toString() );
    }

    private static void add( int n, StringBuilder buff ) {
        for ( int i = 0; i < n; ++i )
            buff.append( c[i] );
    }
}

import java.util.*;

// http://codeforces.com/contest/78/problem/B
public class EasterEggs {
	public static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String[] colours = { "ROYGBIV","G","YG","YGB","OYGB","OYGBI","ROYGBI" };
		int n = ri();
		while(n >= 7) {
			System.out.print(colours[0]);
			n -= 7;
		}
		if(n==0)
			return;
		System.out.print(colours[n%colours.length]);
	}

	public static void rolling(int[] arr) {
		if (arr.length < 2)
			return;
		for (int i = 1; i < arr.length; i++)
			arr[i] += arr[i - 1];
	}

	public static void reverse(int[] arr) {
		for (int i = 0; i < arr.length / 2; i++) {
			int temp = arr[i];
			arr[i] = arr[arr.length - 1 - i];
			arr[arr.length - 1 - i] = temp;
		}
	}

	public static void print(String s) {
		System.out.println(s);
	}

	public static void print(long s) {
		System.out.println(s);
	}

	public static void print(int s) {
		System.out.println(s);
	}

	public static int ri() {
		return Integer.parseInt(sc.nextLine());
	}

	public static long rl() {
		return Long.parseLong(sc.nextLine());
	}

	public static double rd() {
		return Double.parseDouble(sc.nextLine());
	}

	public static String[] rsa() {
		return sc.nextLine().split(" ");
	}

	public static int[] ria() {
		String[] s = rsa();
		int[] arr = new int[s.length];
		for (int i = 0; i < arr.length; i++)
			arr[i] = Integer.parseInt(s[i]);
		return arr;
	}

	public static long[] rla() {
		String[] s = rsa();
		long[] arr = new long[s.length];
		for (int i = 0; i < arr.length; i++)
			arr[i] = Long.parseLong(s[i]);
		return arr;
	}

	public static char[] rca() {
		String s = sc.nextLine();
		char[] arr = new char[s.length()];
		for (int i = 0; i < arr.length; i++)
			arr[i] = s.charAt(i);
		return arr;
	}

	public static int[] riaml(int m) {
		int[] arr = new int[m];
		for (int i = 0; i < arr.length; i++)
			arr[i] = Integer.parseInt(sc.nextLine());
		return arr;
	}

	public static long[] rlaml(int m) {
		long[] arr = new long[m];
		for (int i = 0; i < arr.length; i++)
			arr[i] = Long.parseLong(sc.nextLine());
		return arr;
	}
}

import java.util.*;
public class JavaApplicationM{
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int n=in.nextInt(),j=0,x=3,f=0;
//----------------------------------------------
String s[]={"R","O","Y","G","B","I","V"};

for(int i=0;i<n;i++)
{
 System.out.print(s[j]);
 j++;

 if(j==7){j=3;}

}
}}

import java.util.Scanner;

public class Easter_Eggs {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = "ROYGBIV";
        String s2 = "GBIV";
        int ptr = 0; //green
        int n = sc.nextInt();
        for (int i = 0; i < n; ) {
            if (i < 7)
                System.out.print(s.charAt(i++));
            else {
                for (int j = ptr;i < n; i++, j = (j+1)%4) {
                    System.out.print(s2.charAt(j));
                }

                ptr = Math.abs((ptr +1) % 4);
            }
        }
    }

}

import java.util.*;

public class B70 {
	public static int check (int[] A, int x) {
		int n = A.length;
		boolean[] mark = new boolean[7];
		Arrays.fill(mark, false);

		int k = x;
		for (int i = 0; i < 4; i++) if (k == 0) k = n - 1; else k--;

		for (int i = 0; i < 7; i++){
			k = (k + 1) % n;
			if (A[k] != -1) mark[A[k]] = true;
		}

		for (int i = 0; i < 7; i++) if (!mark[i]) return i;
		return 0;
	}

	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();

		int[] A = new int[n];
		Arrays.fill(A, -1);
		String s = "ROYGBIV";

		for (int i = 0; i < 7; i++) A[i] = i;
		for (int i = 7; i < n; i++) {
			A[i] = check(A, i);
			switch (A[i]){

			case 0: s += "R"; break;
			case 1: s += "O"; break;
			case 2: s += "Y"; break;
			case 3: s += "G"; break;
			case 4: s += "B"; break;
			case 5: s += "I"; break;
			case 6:
			default:s += "V"; break;
			}
		}
		System.out.println(s);
	}
}

import java.io.*;
import java.util.*;

public class Code {

    static InputReader in = new InputReader(System.in);

    public static void main(String[] args) {

        //Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        String str = "ROYGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIVGBIV";

        String s = str.substring(0,n);

        System.out.println(s);

    }

}

class InputReader {

    private final InputStream stream;
    private final byte[] buf = new byte[8192];
    private int curChar, snumChars;

    public InputReader(InputStream st) {
        this.stream = st;
    }

    public int read() {
        if (snumChars == -1) {
            throw new InputMismatchException();
        }
        if (curChar >= snumChars) {
            curChar = 0;
            try {
                snumChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (snumChars <= 0) {
                return -1;
            }
        }
        return buf[curChar++];
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long nextLong() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public int[] nextIntArray(int n) {
        int a[] = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public String nextLine() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndOfLine(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private boolean isEndOfLine(int c) {
        return c == '\n' || c == '\r' || c == -1;
    }

}

import java.io.*;
import java.util.*;
import java.util.Queue;
import java.util.LinkedList;
import java.util.Stack;

public class Main
{
    @SuppressWarnings("unchecked")

      public static void main(String args[])throws IOException
    {
         Reader ob=new Reader();
        Writer out=new Writer(System.out);
        Random oo=new Random();
       int n=ob.nI();
       char c[]="GYOR".toCharArray();
       out.p("ROYGBIV");
       n-=7;
       while(n-->0)
       out.p(c[n%4]);
        out.flush();
}
static void sort(int a[])
{
    RA(a);
    Arrays.sort(a);
}
 public static int[] RA(int [] array){
		Random rgen = new Random();  // Random number generator

		for (int i=0; i<array.length; i++) {
		    int randomPosition = rgen.nextInt(array.length);
		    int temp = array[i];
		    array[i] = array[randomPosition];
		    array[randomPosition] = temp;
		}

		return array;
	}
	static void sort(long a[])
{
    RA(a);
    Arrays.sort(a);
}
 public static long[] RA(long [] array){
		Random rgen = new Random();  // Random number generator

		for (int i=0; i<array.length; i++) {
		    int randomPosition = rgen.nextInt(array.length);
		    long temp = array[i];
		    array[i] = array[randomPosition];
		    array[randomPosition] = temp;
		}

		return array;
	}
	static void sort(String a[])
{
    RA(a);
    Arrays.sort(a);
}
 public static String[] RA(String [] array){
		Random rgen = new Random();  // Random number generator

		for (int i=0; i<array.length; i++) {
		    int randomPosition = rgen.nextInt(array.length);
		    String temp = array[i];
		    array[i] = array[randomPosition];
		    array[randomPosition] = temp;
		}

		return array;
	}
static long inverse(long x, long p)
    {
        return pow(x, p - 2, p);
    }
static boolean isPrime(long n)
{
    long h=(long)Math.sqrt(n);
    for(long i=2;i<=h;i++)
    if(n%i==0)
    return false;
    return true&&n!=1;
}
    static long gcd(long a,long b)
    {
        if(a<b)
        return gcd(b,a);
        else if(b==0)
        return a;
        else
        return gcd(b,a%b);
    }
    static long pow(long a,long b,long mod){
		if(b == 0)	return 1;
		long t = pow(a,b>>1,mod);
		t = (t * t) % mod;
		if((b & 1) == 1)	t = (t * a);
		if(t >= mod)	t %= mod;
		return t;
}
    static long pow(long a,long b){
		if(b == 0)	return 1;
		long t = pow(a,b>>1);
		t = (t * t);
		if((b & 1) == 1)	t = (t * a);
		return t;
}
    static void seive(int n,int prime[])//1 for prime -1 for not prime
    {
        for(int i=2;i<=n;i++)
            if(prime[i]==0)
            {
                prime[i]=1;
                for(int j=2;j*i<=n;j++)
                prime[j*i]=-1;
            }
    }
    static int max(int ...a)
    {
        int m=a[0];
        for(int i=0;i<a.length;i++)
        m=Math.max(m,a[i]);
        return m;

    }
    static long max(long ...a)
    {
        long m=a[0];
        for(int i=0;i<a.length;i++)
        m=Math.max(m,a[i]);
        return m;
    }
    static int min(int ...a)
    {
        int m=a[0];
        for(int i=0;i<a.length;i++)
        m=Math.min(m,a[i]);
        return m;
    }
    static long min(long ...a)
    {
        long m=a[0];
        for(int i=0;i<a.length;i++)
        m=Math.min(m,a[i]);
        return m;
    }
    static class Pair<T1,T2>
    {
        T1 x;T2 y;
        Pair(T1 xx,T2 yy)
        {
            x=xx;
            y=yy;
        }
    }

	static class Writer {
		private final PrintWriter p;
		Writer(OutputStream o) {
			p = new PrintWriter(new BufferedWriter(new OutputStreamWriter(o)));
		}
		void p(Object... o1) {
			for (Object o11 : o1) {
				p.print(o11 + "" );
			}
		}
		void p(String s) {
			p.print(s);
		}
		void pln(Object... o1) {
			p(o1);
			p.println();
		}
		void flush() {
			p.flush();
		}
		void close() {
			p.close();
		}
	}
    static class Reader {
		private byte[] buf = new byte[1024];
		private int curChar;
		private int snumChars;
		int flag=0;
		FileReader file;
		Reader()
		{
		  }
		  Reader(String x)throws IOException
		  {
		      flag=1;
		      file=new FileReader(x);
		  }
		public int read() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = System.in.read(buf);

				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nl() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public String n() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public long nL() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nI() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int[] NIA(int n) //nextINtArray
		{
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nI();
			}
			return arr;
		}
		public int[] NIA1(int n) //nextINtArray
		{
			int[] arr = new int[n+1];
			for (int i = 1; i <=n; i++) {
				arr[i] = nI();
			}
			return arr;
		}

		public long[] NLA(int n) //nextLongArray
		{
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nL();
			}
			return arr;
}
		public long[] NLA1(int n) //nextLongArray
		{
			long[] arr = new long[n+1];
			for (int i = 1; i <=n; i++) {
				arr[i] = nL();
			}
			return arr;
}
		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}
static class DSU
{
    int a[],size[],c=1,m;
    HashMap<String,Integer> hm=new HashMap<String,Integer>();
    DSU(int n)
    {
        a=new int[n+1];
        m=n;
        size=new int[n+1];
        for(int i=1;i<=n;i++)
    {
        a[i]=i;
        size[i]=1;
    }
    }
    void add(String x,int i)
    {
        hm.put(x,i);
    }
    int find(int n)
    {
        while(a[n]!=n)
        {
            a[n]=a[a[n]];
        n=a[n];
    }
        return n;
    }
    int[] eval()
    {
       int y[]=new int[m+1];
       for(int i=1;i<=m;i++)
       y[find(i)]++;
       return y;
    }
    void union(int a1,int b)
    {
        int x=find(a1);
        int y=find(b);
        if(size[x]>size[y])
    {
        a[y]=x;
        size[x]+=size[y];
    }
    else
    {
       a[x]=y;
       size[y]+=size[x];
    }
}
        //System.out.println(Arrays.toString(a));
     int query(String x,String y)
     {
         int p=-1,q=-1;
         if(hm.containsKey(x))
         p=hm.get(x);
         else
         {
             p=c;
         hm.put(x,c++);

        }
         if(hm.containsKey(y))
         q=hm.get(y);
         else
         {
             q=c;
         hm.put(y,c++);
        }
        int m=find(p),n=find(q);
        if(m!=n)
        {
        union(m,n);
            return 2;
        }
        else
        return 1;
}
}
class Segment
{
    int sum[];
    void build(int a[],int v,int l,int r)
    {
        if(l==r)
        sum[v]=a[l];
        else
        {
            int m=(l+r)/2;
            build(a,v*2,l,m);
            build(a,2*v+1,m+1,r);
            sum[v]=sum[v*2]+sum[2*v+1];
        }
    }
    void update(int a[],int l,int r,int x,int v,int y)
    {
        if(l==r&&r==y)
            sum[v]+=x;
        else if(l>y||y>r)
        return;
        else
        {
            int m=(l+r)/2;
            update(a,l,m,x,2*v,y);
            update(a,m+1,r,x,2*v+1,y);
            sum[v]=sum[2*v]+sum[2*v+1];
        }
    }
    int query(int v,int l,int r,int x,int y)
    {
        if(x>r||y<l)
        return 0;
        else if(x<=l&&r<=y)
        return sum[v];
        else
        {
            int m=(l+r)/2;
        return query(2*v,l,m,x,y)+query(2*v+1,m+1,r,x,y);
    }
}
}

static class Trie
  {
      Trie child[]=new Trie[26];
      int count=0;
    }
   /* void insert(String a)
    {
        Trie tmp=root;
        for(int i=0;i<a.length();i++)
        {
            int v=a.charAt(i)-'a';
            if(tmp.child[v]==null)
            {
                tmp.child[v]=new Trie();

            }
                tmp=tmp.child[v];
            }
            if(tmp.count==0)
            r++;
            tmp.count=1;
        }*/
    }

import java.io.*;
import java.util.*;

public class Main {

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private final DataInputStream din;
        private final byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

    static long MOD = (long) (1e9 + 7);

    static long powerLL(long x, long n)
    {
        long result = 1;
        while (n > 0)
        {
            if (n % 2 == 1)
            {
                result = result * x % MOD;
            }
            n = n / 2;
            x = x * x % MOD;
        }
        return result;
    }

    static long powerStrings(String sa, String sb)
    {
        long a = 0, b = 0;

        for (int i = 0; i < sa.length(); i++)
        {
            a = (a * 10 + (sa.charAt(i) - '0')) %
                    MOD;
        }

        for (int i = 0; i < sb.length(); i++)
        {
            b = (b * 10 + (sb.charAt(i) - '0')) %
                    (MOD - 1);
        }

        return powerLL(a, b);
    }

    static long gcd(long a, long b)
    {
        if (a==0) return b;
        else return gcd(b%a,a);
    }

    static long lcm(long a, long b)
    {
        return (a*b)/gcd(a,b);
    }

    static int lower_bound(List<Integer> list, int k)
    {
        int s = 0;
        int e = list.size();

        while (s!=e)
        {
            int mid = (s+e)>>1;

            if (list.get(mid)<k) s = mid+1;
            else e = mid;
        }

        if (s == list.size()) return -1;
        return s;
    }

    static int upper_bound(List<Integer> list, int k)
    {
        int s = 0;
        int e = list.size();

        while (s!=e)
        {
            int mid = (s+e)>>1;

            if (list.get(mid)<=k) s = mid+1;
            else e = mid;
        }

        if (s == list.size()) return -1;
        return s;
    }

    static void addEdge(ArrayList<ArrayList<Integer>>graph, int edge1, int edge2)
    {
        graph.get(edge1).add(edge2);
        graph.get(edge2).add(edge1);
    }

    static class Pair<X,Y>
    {
        public final X first;
        public final Y second;

        Pair(X first, Y second)
        {
            this.first = first;
            this.second = second;
        }

        public static <X,Y> Pair <X,Y> of (X a, Y b)
        {
            return new Pair<>(a,b);
        }

        public String toString()
        {
            return "("+first+","+second+")";
        }
    }

    static class Comparee
    {
        static void compare(List<Pair<Integer, Integer>> pairs, int m)
        {
            Collections.sort(pairs, new Comparator<Pair<Integer, Integer>>() {
                @Override
                public int compare(Pair<Integer, Integer> p1, Pair<Integer, Integer> p2) {
                    return p1.second - p2.second;
                }
            });
        }
    }

    public static void main(String[] args) throws java.lang.Exception
    {
        try
        {
            FastReader fr = new FastReader();
            //Reader fr = new Reader();

            //try(OutputStream out = new BufferedOutputStream(System.out))
            try(BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out)))
            {
                int n = fr.nextInt();

                String s1 = "VIBGYOR";
                String s = "";

                int len = n/7;

                for (int i=1;i<=len;i++) s+=s1;

                len = n%7;

                int l = 0;
                int ind = 0;
                String s2 = "GYOR";
                while (l!=len)
                {
                    s+=s2.charAt(ind);
                    ind++;

                    if (ind == 4) ind = 0;
                    l++;
                }

                //out.write((s).getBytes());
                out.write(s);

                out.flush();
            }

        }

        catch(Exception e){}
        finally{}
    }
}

//(()) () (()((()()()())))

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc =  new Scanner(System.in);
        int n = sc.nextInt();
        StringBuilder sb = new StringBuilder("VIBGYOR");
        char[] add = "GYOR".toCharArray();
        int j = 0;
        for (int i = 8; i <= n; i++) {
            sb.append(add[j++]);
            if (j == 4) j = 0;
        }
        System.out.println(sb);
    }
}

// package main;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int sizee = scanner.nextInt();
        ArrayList<String> arr = new ArrayList<>(Arrays.asList("R", "O", "Y", "G", "B", "I", "V"));
        ArrayList<String> arrAfter = new ArrayList<>(Arrays.asList("R", "O", "Y", "G"));
        ArrayList<String> arrBefore = new ArrayList<>(Arrays.asList("G", "B", "I", "V"));
        String answer = "ROYGBIV";

        for (int i = 7; i < sizee; i++) {
            answer += arrBefore.get(0);
            arrBefore.add(arrBefore.get(0));
            arrBefore.remove(0);
        }

        System.out.println(answer);
    }
}

import java.util.Scanner;

public class Main
{
	public static void main(String[] args) {

		String str = "ROYGBIV";

		Scanner in =new Scanner(System.in);

		int n = in.nextInt();

		for (int i=7;i<n;i++){

		    str = str+str.charAt(str.length()-4);

		}

		System.out.println(str);

	}
}

/*

 ////  /////    /// ////// //  //  ////  //     /// //  // /////  //  // //////
 /  // //      ////   /    //  //  // // //    //// //  // //     //  //   /
 /  // ////   /////   /    //////  // // //   ///// //  // // /// //////   /
 /  // //    //  //   /    //  //  // // //  //  // //  // //  // //  //   /
 ////  //// //   //   /    //  //  //  //// //   // ////// ////// //  //   /

*/

import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.StringTokenizer;

/*
* Problem : 78 B
* Acknowledgement : None
* Author : deathnaught_
* GitHub : www.github.com/DeathNaughT-GitHub
* Complexity : O(N)
*/

public class B78
{
    static class MyDS
    {
        ArrayList<Integer> arr;
        HashMap<Integer, Integer>  hash;

        public MyDS()
        {
            arr = new ArrayList<Integer>();
            hash = new HashMap<Integer, Integer>();
        }

        void add(int x)
        {
            if (hash.get(x) != null)
            return;

            int s = arr.size();
            arr.add(x);
        hash.put(x, s);
        }

        void remove(int x)
        {
            Integer index = hash.get(x);
            if (index == null)
            return;
            hash.remove(x);
            int size = arr.size();
            Integer last = arr.get(size-1);
            Collections.swap(arr, index,  size-1);
            arr.remove(size-1);
            hash.put(last, index);
        }

        Integer search(int x)
        {
            return hash.get(x);
        }
    }

    static class FastReader
    {

        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

		boolean hasNext()
		{
		    return st == null ? false : true;
		}

        char nextChar()
        {
            return next().charAt(0);
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        BigInteger nextBigInteger()
        {
            return (new BigInteger(next()));
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }

        int[] nextArray(int rows)
        {
            int arr[] = new int[rows];
            for (int i = 0; i < rows; i++)
            arr[i] = nextInt();
            return arr;
        }

        long[] nextLongArray(int rows)
        {
            long arr[] = new long[rows];
            for (int i = 0; i < rows; i++)
            arr[i] = nextLong();
            return arr;
        }

        char[] nextCharArray(int rows)
        {
            char arr[] = new char[rows];
            for (int i = 0; i < rows; i++)
            arr[i] = next().charAt(0);
            return arr;
        }

        int[][] nextMatrix(int rows, int columns)
        {
            int mat[][] = new int[rows][columns];
            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < columns; j++)
                {
                    mat[i][j] = nextInt();
                }
            }
            return mat;
        }
    }

    public static void main(String[] args)
    {

        FastReader sc = new FastReader();

        int N = sc.nextInt();
        String s = "VIBGYOR";
        if (N <= 7)
        System.out.println(s.substring(0, N));
        else
        {

            String w = s;
            s = "GYOR";
            int pos = 0;
            int k = N - 7;
            while (k > 0)
            {
                w = w + s.charAt(pos);
                pos = (pos + 1) % 4;
                k--;
            }

            System.out.println(w);

        }
    }

}

/*

                                                               __..-'
                                                         _.--''
                                               _...__..-'
                                             .'
                                           .'
                                         .'
                                       .'
            .------._                 ;
      .-"""`-.<')    `-._           .'
     (.--. _   `._       `'---.__.-'
      `   `;'-.-'         '-    ._
        .--'``  '._      - '   .
         `""'-.    `---'    ,
 ''--..__      `\
         ``''---'`\      .'
                   `'. '
                     `'.
                                                        @deathnaught_
*/

import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author KHALED
 */
public class EasterEggs {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        char[]arr=new char[7];
        arr[0]='R';   arr[1]='O';   arr[2]='Y';   arr[3]='G';   arr[4]='B';   arr[5]='I';   arr[6]='V';
        while(n>=1)
        {
            if(n>=7)
            {
                for (int i = 0; i < 7; i++) {
                    System.out.print(arr[i]);
                }
                n-=7;
            }
            else if(n<=4)
            {
                for (int i = 3; i < 3+n; i++)
                {
                    System.out.print(arr[i]);
                }
                n=0;
            }
            else
            {
                for (int i = 0; i < n; i++) {
                    System.out.print(arr[i]);
                }
                n=0;
            }
        }
    }
}

import java.util.*;

public class EasterEggs {

    public static void main(String[] args) {
        char[] colors = {'R', 'O', 'Y', 'G', 'B', 'I', 'V' };
        Scanner in = new Scanner(System.in);
        int numEggs = in.nextInt();
        int start = 0;

        for (int i = 0; i < numEggs; i++ ) {
                System.out.print(colors[(start+i)%7]);
                if((start+i)%7 == 6)
                        start += 3;
        }
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {

    public static int countvowel(String s) {
        int n = 0;
        for (int x = 0; x < s.length(); x++) {
            if (s.charAt(x) == 'a' || s.charAt(x) == 'i'|| s.charAt(x) == 'u' || s.charAt(x) == 'e' || s.charAt(x) == 'o') {
                n++;
            }
        }
        return n;
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int n = scan.nextInt(), y = n /7, z = n % 7;
        String x = "ROYGBIV", end = "GBIV", result = "";
        for (int a = 0; a < y ; a++) {
            result += x;
        }
        for (int a = 0; a < z; a++) {
            result += Character.toString(end.charAt(a % 4));
        }
        System.out.println(result);
    }
}

import java.util.Scanner;
import java.util.Collections;;
public class acm  {
public static void main(String[] args){
	Scanner in=new Scanner(System.in);
	String x="ROYGBIV";
	int n=in.nextInt();
	int index=n-7;
	for(int i=0;i<index;i++)
	{

		char ch=x.charAt(x.length()-1-3);
		x+=ch;

	}
	System.out.println(x);

}}

import java.util.*;
public class EasterEggs {

    private static Scanner scan= new Scanner(System.in);

    public static void main(String [] args){
        char [] chars= {'R','O','Y','G','B','I','V'};

        int n= scan.nextInt();
        char [] output= new char[n];
        for(int i= 0; i< n; i++){
            if(i < 7) output[i] = chars[i];
            else output[i] = output[i - 4];
        }

        System.out.println(output);
    }
}

import java.util.Scanner;
public class Ishu
{
	public static void main(String[] args)
	{
	Scanner scan=new Scanner(System.in);
	int n,i,j;
	String str="ROYGBIV";
	n=scan.nextInt();
	i=n/7;
	j=n%7;
	while(--i>0)
		str=str+"ROYGBIV";
	switch(j)
		{
		case 6:	str=str+"OYGBIV";
			break;
		case 5:	str=str+"YGBIV";
			break;
		case 4:	str=str+"GBIV";
			break;
		case 3: str=str+"OYG";
			break;
		case 2: str=str+"YG";
			break;
		case 1:	str=str+"G";
		}
	System.out.println(str);
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Main1 solver = new Main1();
        solver.solve(1, in, out);
        out.close();
    }

    static class Main1{
        public void solve(int testNumber, FastReader s, PrintWriter out) {
            int n=s.nextInt();
            int z=n/7;
            for(int i=0;i<z;i++) out.print("ROYGBIV");
            z=n%7;
            //out.println(z);
            if(z==1) out.print("G");
            else if(z==2) out.print("GB");
            else if(z==3) out.print("YGB");
            else if(z==4) out.print("YGBI");
            else if(z==5) out.print("OYGBI");
            else if(z==6) out.print("OYGBIV");

		out.close();
        }
    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}

import java.util.Scanner;

public class EasterEggs {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char c[] = new char[7];
		c[0] = 'R'; c[1] = 'O'; c[2] = 'Y'; c[3] = 'G'; c[4] = 'B'; c[5] = 'I'; c[6] = 'V';
		int n = sc.nextInt();
		for(int i = 0; i < 7; i++) {
			System.out.print(c[i]);
		}
		int j = 3;
		for(int i = 7; i < n; i++) {
			System.out.print(c[j++]);
			if(j == 7) {
				j = 3;
			}
		}
	}
}

import java.math.BigInteger;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String s1 = "ROYGBIV", s2 = "GBIV";
        StringBuilder res = new StringBuilder();
        for (int i = 0; i < (n / 7); i++)
            res.append(s1);
        int r = (n % 7);
        for (int i = 0; i < (r / 4); i++) {
            res.append(s2);
        }
        r = r % 4;
        System.out.println(res.append(s2.substring(0,r)));
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Mohamed El Zarei
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int n = in.nextInt();
            String clrs = "ROYGBIV";
            String ans = "";
            int rem = n;
            while (rem >= 7) {
                rem -= 7;
                ans += clrs;
            }
            if (rem > 0)
                if (rem + 3 <= 7)
                    ans += clrs.substring(3, 3 + rem);
                else
                    ans += clrs.substring(clrs.length() - rem);
            out.println(ans);
        }

    }

    static class FastScanner {
        StringTokenizer st;
        BufferedReader br;

        public FastScanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() {
            try {
                while (st == null || !st.hasMoreTokens())
                    st = new StringTokenizer(br.readLine());
                return st.nextToken();
            } catch (IOException e) {
                return null;
            }
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.util.Scanner;

public class EasterEggs_78B {

    public static void main(String[] args) {
        int number = new Scanner(System.in).nextInt();
        String a = "ROYGBIV";

        String answer = "ROYGBIV";
        number -= 7;

        while (number > 0) {
            answer += answer.charAt(answer.length() - 4);
            number--;
        }

        System.out.println(answer);
    }

}

import java.util.*;
public class MyClass {
    public static void main(String args[]) {
      Scanner sc= new Scanner(System.in);
        int n=sc.nextInt();
        String str="ROYGBIV".repeat(n/7);
        int remainder = n%7;
        String arr[]={"", "G", "GB", "YGB", "YGBI", "OYGBI", "OYGBIV"};
        str+=arr[remainder];
      System.out.print(str);
    }
}

import java.io.*;
import java.util.*;
public class Main {

    public static void main(String[] args) {
        InputReader sc = new InputReader(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        Random gen = new Random();
        int test = 1;//sc.nextInt();
        while(test-->0) {

            String colours = "ROYGBIV";
            String str = "GBIVGB";
            int n = sc.nextInt();

            int x = n/7;
            int rem = n%7;

            StringBuffer sb = new StringBuffer();
            sb.append(colours.repeat(x));

            if(rem!=1)
                sb.append(str.substring(0,rem));
            else
                sb.append("G");
            pw.println(sb);
        }
        pw.close();

    }

    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;

        public InputReader(InputStream st) {
            this.stream = st;
        }

        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public static int[] shuffle(int[] a, Random gen)
        { for(int i = 0, n = a.length;i < n;i++)
        { int ind = gen.nextInt(n-i)+i;
            int d = a[i];
            a[i] = a[ind];
            a[ind] = d;

        }
            return a;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

    }

}

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 *
 * @author moham
 */

public class JavaApplication1 {

public static void main(String[] args) {
Scanner s=new Scanner(System.in);
int x=s.nextInt();
char colors[]={'R','O','Y','G','B','I','V'};
String line="ROYGBIV";
if(x>7)
{

int job=3;
for(int point=7;point<x;point++)
{
    if (job==7)job=3;
    line=line+colors[job++];
}
}
    System.out.println(line);
    }

}

import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
import java.util.Comparator;

public class scratch_25 {
    static class Reader {
        static BufferedReader reader;
        static StringTokenizer tokenizer;

        /**
         * call this method to initialize reader for InputStream
         */
        static void init(InputStream input) {
            reader = new BufferedReader(
                    new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }

        /**
         * get next word
         */
        static String next() throws IOException {
            while (!tokenizer.hasMoreTokens()) {
                //TODO add check for eof if necessary
                tokenizer = new StringTokenizer(
                        reader.readLine());
            }
            return tokenizer.nextToken();
        }

        static int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        static long nextLong() throws IOException {
            return Long.parseLong(next());
        }
    }

    static class ans {
        int a;
        int b;

        public ans(int a, int b) {
            this.a = a;
            this.b = b;

        }
    }

    static class sort implements Comparator<ans> {

        @Override
        public int compare(ans a1, ans a2) {
            return a1.b - a2.b;
        }

    }

    public static void main(String[] args) throws IOException {
        Reader.init(System.in);
       int n= Reader.nextInt();
       String str= "ROYGBIV";
       String str1= "GBIV";
       String s="";
       int count=0;
        for (int i = 0; i <n/7 ; i++) {
            s+=str;
            count+=7;
        }
        for (int i = 0; i <(n-count)/4 ; i++) {
            s+=str1;
            count+=4;
        }
        //s+=str.substring(str.length()-(n-count));
        s+=str1.substring(0,n-count);
        System.out.println(s);

        }

    public static char[] getCharArray(char[] array) {
        String _array = "";
        for(int i = 0; i < array.length; i++) {
            if(_array.indexOf(array[i]) == -1) // check if a char already exist, if not exist then return -1
                _array = _array+array[i];      // add new char
        }
        return _array.toCharArray();
    }

    static void merge(long arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[] = new long [n1];
        long R[] = new long [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    static void sort(long arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
    static boolean ans(int check, long arr[],int n,int med,int k){
        long ans=0;
        for (int i = med; i <n ; i++) {
            if(check>=arr[i]){
                ans+=check-arr[i];
            }
        }
        return ans<=k;

    }

    static boolean isPrime(long n)
    {
        // Corner cases
        if (n <= 1) return false;
        if (n <= 3) return true;

        // This is checked so that we can skip
        // middle five numbers in below loop
        if (n % 2 == 0 || n % 3 == 0) return false;

        for (long i = 5; i * i <= n; i = i + 6)
            if (n % i == 0 || n % (i + 2) == 0)
                return false;

        return true;
    }

    static   int partition(double arr[],int arr1[],int arr2[], int low, int high)
    {
        double pivot = arr[high];
        int i = (low-1); // index of smaller element
        for (int j=low; j<high; j++)
        {
            // If current element is smaller than the pivot
            if (arr[j] < pivot)
            {
                i++;

                // swap arr[i] and arr[j]
                double temp = arr[i];
                arr[i] = arr[j];
                arr[j] = temp;
                int temp1=arr1[i];
                arr1[i]=arr1[j];
                arr1[j]=temp1;
                int temp2=arr2[i];
                arr2[i]=arr2[j];
                arr2[j]=temp2;

            }
        }

        // swap arr[i+1] and arr[high] (or pivot)
        double temp = arr[i+1];
        arr[i+1] = arr[high];
        arr[high] = temp;
        int temp1= arr1[i+1];
        arr1[i+1]=arr1[high];
        arr1[high]= temp1;
        int temp2= arr2[i+1];
        arr2[i+1]=arr2[high];
        arr2[high]= temp2;

        return i+1;
    }

    /* The main function that implements QuickSort()
      arr[] --> Array to be sorted,
      low  --> Starting index,
      high  --> Ending index */
    static void sort(double arr[],int arr1[],int arr2[], int low, int high)
    {
        if (low < high)
        {
            /* pi is partitioning index, arr[pi] is
              now at right place */
            int pi = partition(arr,arr1,arr2, low, high);

            // Recursively sort elements before
            // partition and after partition
            sort(arr,arr1,arr2, low, pi-1);
            sort(arr,arr1, arr2,pi+1, high);
        }
    }
    static int removeDuplicates(int arr[], int n)
    {
        // Return, if array is empty
        // or contains a single element
        if (n==0 || n==1)
            return n;

        int[] temp = new int[n];

        // Start traversing elements
        int j = 0;
        for (int i=0; i<n-1; i++)
            // If current element is not equal
            // to next element then store that
            // current element
            if (arr[i] != arr[i+1])
                temp[j++] = arr[i];

        // Store the last element as whether
        // it is unique or repeated, it hasn't
        // stored previously
        temp[j++] = arr[n-1];

        // Modify original array
        for (int i=0; i<j; i++)
            arr[i] = temp[i];

        return j;
    }
    static long maxPrimeFactors( long n)
    {
        // Initialize the maximum prime
        // factor variable with the
        // lowest one
        long maxPrime = -1;

        // Print the number of 2s
        // that divide n
        while (n % 2 == 0) {
            maxPrime = 2;

            // equivalent to n /= 2
            n >>= 1;
        }

        // n must be odd at this point,
        // thus skip the even numbers
        // and iterate only for odd
        // integers
        for (int i = 3; i <= Math.sqrt(n); i += 2) {
            while (n % i == 0) {
                maxPrime = i;
                n = n / i;
            }
        }

        // This condition is to handle
        // the case when n is a prime
        // number greater than 2
        if (n > 2)
            maxPrime = n;

        return maxPrime;
    }

}

import java.lang.*;
import java.util.*;

public class Ester{

	public static void main(String args[]){

	Scanner sc = new Scanner(System.in);
	int n=sc.nextInt();
	char ar[]={'R','O','Y','G','B','I','V'};
	int m=(n/7);
	int r=(n%7);

	for(int i=0;i<m;i++){
		int p=0;
		while(p!=7){
			System.out.print(ar[p]);
			p=1+p;
		}
	}
	if(r>3){
		for(int j=0;j<r;j++){
			System.out.print(ar[j]);
		}
	}
	else{
		int x=4-r;
		for(int k=x;(k-x)<r;k++){
			System.out.print(ar[k]);
		}
	}
	}
}

import java.util.*;

public class Main {

    public static void main(String args[]) {

        Scanner in = new Scanner (System.in);
        int x = in.nextInt();

        String colors = "ROYGBIV";

        String ans = colors;
        for(int i =7; i < x;i++)
        {

            ans += ans.charAt(ans.length()-4);
        }
        System.out.println(ans);
    }

}

//package com.company;

import java.io.File;
import java.io.FileNotFoundException;
import java.nio.charset.StandardCharsets;
import java.util.*;

public class Main {

    public static void main(String[] args) {

        //File file = new File("/Users/ahmed/Development/CompetitiveProgramming\ git java/src/com/company/in.txt");
        //Scanner scanner = new Scanner(file);
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        char[] colors = {'R', 'O', 'Y', 'G', 'B', 'I' , 'V' };
        int[] indexes  = new int[n];
        int numberOfColors = colors.length;

        for (int i = 0; i < n ; i++) {
            indexes[i] = i % numberOfColors;
        }

        int mod =n%7;

        if (mod > 0 && mod < 4){
            for (int i = 0; i < mod; i++) {
                swap (indexes,n-i-1, n-i-1-3);
            }
        }

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n ; i++) {
            sb.append(colors[indexes[i]]);
        }
        System.out.print(sb.toString());
    }

    static void swap(int[] a, int index1, int index2){
        int tempVal = a[index1];
        a[index1] = a[index2];
        a[index2] = tempVal;
    }
}

import java.util.Scanner;

/**
 *
 * @author epiZend
 */
public class EasterEggs {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        n -= 3;
        String royg = "ROYG";
        while(n > 0){
            System.out.print(royg.substring(0, Math.min(4, n)));
            n -= 4;
        }
        System.out.println("BIV");
    }

}

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
       int a=0,t,n=sc.nextInt();
        String s="ROYG";
        String s2="BIV";
        for(t=0;t<(n/4)-1;t++)System.out.print(s);
        if(n%4==0)System.out.print("RBIV");
        else if(n%4==1)System.out.print("ROBIV");
        else if(n%4==2)System.out.print("ROYBIV");
        else if(n%4==3)System.out.print(s+s2);

    }}

public class B {
    public static void main(String[] args) {
        String[] c = { "R", "O", "Y", "G", "B", "I", "V" };
        n = new java.util.Scanner(System.in).nextInt();
        p = new int[n];
        f(0);
        for(int i = 0; i < n; ++i){
            System.out.print(c[p[i]-1]);
        }
        System.out.println();
    }

    static int n;
    static int[] p;
    static int[] bc = new int[8];

    static boolean f(int i) {
        if(i == n){
            for(int j = 1; j <= 7; ++j){
                if(bc[j] < 1){
                    return false;
                }
            }
            return true;
        }
        boolean[] b = new boolean[8];
        for (int d = -3; d <= 3; ++d) {
            int j = i + d;
            if(j >= n){
                j -= n;
            }else if(j < 0){
                j += n;
            }
            b[p[j]] = true;
        }
        for (int j = 1; j <= 7; ++j) {
            if (!b[j]){
                p[i] = j;
                ++bc[j];
                if(f(i + 1)){
                    return true;
                }
                --bc[j];
                p[i] = 0;
            }
        }
        return false;
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Scanner;
import java.util.Arrays;
import java.util.StringTokenizer;

public class sample {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String[] colors = { "R", "O", "Y", "G", "B", "I", "V" };
        String c1 = "ROYGBIV";
        String ans = "";
        int cnt = 0;
        if (n < 8) {
            ans = c1.substring(0, n);
        } else {
            ans = c1;
            for (int i = 7; i < n; i++) {
                ans += ans.substring(ans.length() - 4, ans.length() - 3);
            }
        }
        System.out.println(ans);
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class problemA {
		public static void main (String args []) throws IOException
				{  Scanner sc=new Scanner (System.in);
				int x=sc.nextInt();
				String s="ROY";
				StringBuilder s2=new StringBuilder();
				char[] ch2= {'G','B','I','V'};
				x=x-3;
				for(int i=0;i<x;i++)
				{
					int j=i%4;
					s2=s2.append(ch2[j]);
				}
			    	System.out.print(s);
					System.out.print(s2);

				}

		static class Scanner
		{
			StringTokenizer st;
			BufferedReader br;

			public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

			public String next() throws IOException
			{
				while (st == null || !st.hasMoreTokens())
					st = new StringTokenizer(br.readLine());
				return st.nextToken();
			}

			public int nextInt() throws IOException {return Integer.parseInt(next());}

			public long nextLong() throws IOException {return Long.parseLong(next());}

			public String nextLine() throws IOException {return br.readLine();}

			public double nextDouble() throws IOException
			{
				String x = next();
				StringBuilder sb = new StringBuilder("0");
				double res = 0, f = 1;
				boolean dec = false, neg = false;
				int start = 0;
				if(x.charAt(0) == '-')
				{
					neg = true;
					start++;
				}
				for(int i = start; i < x.length(); i++)
					if(x.charAt(i) == '.')
					{
						res = Long.parseLong(sb.toString());
						sb = new StringBuilder("0");
						dec = true;
					}
					else
					{
						sb.append(x.charAt(i));
						if(dec)
							f *= 10;
					}
				res += Long.parseLong(sb.toString()) / f;
				return res * (neg?-1:1);
			}

			public boolean ready() throws IOException {return br.ready();}

		}

				}

import java.util.*;

public class A{
		static int MaxN=(int)1e6;
static Scanner scan=new Scanner(System.in);
static int [] reverse(int a[], int n)
    {
        int[] b = new int[n];
        int j = n;
        for (int i = 0; i < n; i++) {
            b[j - 1] = a[i];
            j = j - 1;
        }
return b;
         }
static int []ret(int ar[]){

int bol[]=new int[MaxN];
Arrays.fill(bol,-1);
  for (int i : ar) {
      bol[i] = 1;
    }
return bol;
}
public static void main(String[] args)
{
	int n=scan.nextInt();
	String s="";
if(n==7){
	s+="ROYGBIV";

System.out.println(s);
return;
}

	if(n%7==0){
	for(int i=0;i<n;i+=7){
s+="ROYGBIV";

	}
	System.out.println(s);
return;
}
	else {
		int mod=n%7;
		n=n-mod;
		for(int i=0;i<n;i+=7){
			s+="ROYGBIV";
		}
		if(mod==1)
		s+="G";
	else if(mod==2)
		s+="GB";
	else if(mod==3)
		s+="GBI";
	else if(mod==4)
		s+="GBIV";
	else if(mod==5)
		s+="OYGBI";
	else if(mod==6)
		s+="GBIVYG";

		System.out.println(s);
		return;

	}}

}

import java.util.Scanner;
public class Acm {
    public static void main(String[] args) {

        Scanner input = new Scanner(System.in) ;
       int size = input.nextInt();
        char[] arr =new char[7];
        arr[0]='R';arr[1]='O';arr[2]='Y';arr[3]='G';arr[4]='B';arr[5]='I';arr[6]='V';

        char []output = new char [size];
        output[size-1]='a';
        for(int i=0;i<7;i++)
            output[i]=arr[i] ;
        int x = 0;
        char y= arr[0] ;

        for(int i=7;i<i+1;i++)
        {

    if(size==7)
                  break ;

                if(output[size-1]!='a')//
                     break ;
            while(true)
            {  //                 System.out.println(y);
            //System.out.print(output[i-1]);System.out.print(output[i-2]);
            //System.out.print(output[i-3]);System.out.println(output[i-4]);
          //  System.out.println("cc");
           // System.out.print(output[(i+1)%size]);System.out.print(output[(i+2)%size]);
         //   System.out.print(output[(i+3)%size]);System.out.println(output[(i+4)%size]);

                   if(y!=output[i-1]&&y!=output[i-2]&&y!=output[i-3]&&y!=output[(i+1)%size]&&y!=output[(i+2)%size]&&y!=output[(i+3)%size])
                   {
                  //     System.out.println(y);
                       output[i]=y;
                       break ;
                   }//&&y!=output[i-4] &&y!=output[(i+4)%size]
                   else
                   {

                      if(x>6)
                          x=0;
             y = arr[x];
             x++;
                   }

            }
      //      else
        //        i--;
          //  x++ ;

            }

        for(int i=0;i<size;i++)
         System.out.print(output[i]);

 //int x = input.nextInt();
// System.out.print(10%10);
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {
    private static StreamTokenizer in;
    private static PrintWriter out;
    private static BufferedReader inB;

    private static int nextInt() throws Exception{
        in.nextToken();
        return (int)in.nval;
    }

    private static String nextString() throws Exception{
        in.nextToken();
        return in.sval;
    }

    static{
        inB = new BufferedReader(new InputStreamReader(System.in));
        in = new StreamTokenizer(inB);
        out = new PrintWriter(System.out);
    }

    public static void main(String[] args)throws Exception{
        int n = nextInt();

        String ans = "";
        for(int i = 0; i<n/7; i++) {
            ans += "ROYGBIV";
        }

        char[] c = "GBIVGBI".toCharArray();

        for(int i = 0; i<n%7; i++) {
            ans += c[i];
        }

        System.out.println(ans);
    }
}

import java.util.Scanner;

public class ClientCode {

    public static void main(String[] str) {
        easterEggs();
    }

// ------------------------------------------

 public static void easterEggs(){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String eggs = "ROYGBIV";
        for(int i = 7 ; i < n ;i++){
            eggs += eggs.charAt(eggs.length() - 4);
        }

        System.out.println(eggs);
    }

}

import java.io.*;
import java.util.*;
import java.math.*;

public class B {
    private void solve() throws IOException {
        int n = nextInt();
        char[] q = new char[] { 'R', 'O', 'Y', 'G', 'B', 'I', 'V' };
        String res = "";
        if (n <= 7) {
            for (int i = 0 ; i < n ; i++) {
                res += q[i]+"";
            }
        }
        else if (n % 7 == 0) {
            n /= 7;
            for (int i = 0; i < n; i++) {
                res += new String(q);
            }
        } else {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < q.length; j++) {
                    if (cant(q[j], res)) {
                        res += q[j]+"";
                        break;
                    }
                }
            }
        }
        System.out.println(res);
    }

    private boolean cant (char l , String s) {
        int count = 3;
        for (int i = 0 ; i < s.length(); i = (i+1) % s.length()) {
            if (count == 0)break;
            if (s.charAt(i) == l) {
                return false;
            }
            count--;
        }
        count = 3;
        for (int i = s.length() - 1; i >= 0; i--) {
            if (count == 0)break;
            if (s.charAt(i)==l) {
                return false;
            }
            count--;

        }
        return true;
    }

    public static void main(String[] args) {
        new B().run();
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int[] readIntArray(int size) throws IOException {
        int[] res = new int[size];
        for (int i = 0; i < size; i++) {
            res[i] = nextInt();
        }
        return res;
    }

    long[] readLongArray(int size) throws IOException {
        long[] res = new long[size];
        for (int i = 0; i < size; i++) {
            res[i] = nextLong();
        }
        return res;
    }

    double[] readDoubleArray(int size) throws IOException {
        double[] res = new double[size];
        for (int i = 0; i < size; i++) {
            res[i] = nextDouble();
        }
        return res;
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    BigInteger nextBigInteger() throws IOException {
        return new BigInteger(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
}

import java.io.*;

public class Main {
    private static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
    private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws IOException {

        int n = Integer.parseInt(in.readLine());
        out.print("ROYGBIV");
        n-=7;
        while(n>0){
            out.print("G");
            n--;
            if(n>0){
                out.print("B");
            }
            n--;
            if(n>0){
                out.print("I");
            }
            n--;
            if(n>0){
                out.print("V");
            }
            n--;
        }
        out.flush();
    }

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aeroui
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();

            String s = "ROYGBIV";
            while (n > 7) {
                out.print(s);
                n -= 7;
            }

            int cur = 1;

            while (n-- > 0) {
                out.print(s.charAt(cur++));
                cur %= 7;

            }
        }

    }
}

import java.util.Scanner;

public class EasterEggs {

    int n;
    String str = "ROYGBIV";
    // ROYGBIV
    public void solve() {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
       // n = 10;
        for (int i=0; i<n; i++) {
            System.out.print(str.charAt(i%7));
        }

    }

    public static void main(String[] args) {
        new EasterEggs().solve();
    }
}

import java.util.Scanner;
public class Ishu
{
	public static void main(String[] args)
	{
	Scanner scan=new Scanner(System.in);
	int n,i,j;
	String str="ROYGBIV";
	n=scan.nextInt();
	i=n/7;
	j=n%7;
	while(--i>0)
		str=str+str;
	switch(j)
		{
		case 6:	str=str+"OYGBIV";
			break;
		case 5:	str=str+"YGBIV";
			break;
		case 4:	str=str+"GBIV";
			break;
		case 3: str=str+"OYG";
			break;
		case 2: str=str+"YG";
			break;
		case 1:	str=str+"G";
		}
	System.out.println(str);
	}
}

import java.util.Scanner;

public class Codeforces {

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String color = "ROYGBIV";
		System.out.print(color);
		int k =3;
		for(int i=8;i<=n;i++)
		{
			if(n>=8)
			{
				if(k%7 ==0)
				{
					k=3;
				}
				else
					System.out.print(color.charAt(k++));
			}
		}
	}
}

import java.util.Scanner;

public class EasterEggs {
    public static void main (String ... args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        String colors = "ROYGBIV";
        StringBuilder result = new StringBuilder();
        result.append(colors.substring(7-n%7));
        for (int i=0; i<n/7; i++){
            result.append(colors);
        }
        System.out.println(result);
    }
}

// package com.company;
import java.io.*;
import java.util.*;
public class Main {

    public static void main(String[] args) throws Exception {
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 char[] ch ={'G','B','I','V','R','O','Y'};
	 int n = Integer.parseInt(br.readLine());
	 String s="ROYGBIV";
	 String ans="";
	 for(int i=0;i<n/7;i++)
     {
         ans+=s;
     }
	 for(int i=0;i<n%7;i++)
     {
         ans+=ch[i];
     }
	 System.out.println(ans);
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class EasterEggs {

    public static void main(String[] args) {
        FastReader reader = new FastReader();

        int n = reader.nextInt();
        String color = "ROYGBIV";
        StringBuilder builder = new StringBuilder();

        for (int i = 0; i < n/7; i++) {
            builder.append(color);
        }
        builder.append(color.substring(0, n%7));
        System.out.println(builder.toString());
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class B_70 {
    public static void main(String[] args) {
        try {
            BufferedReader input = new BufferedReader(new InputStreamReader(
                    System.in));
            String line = input.readLine();
            char[] colors = { 'R', 'O', 'Y', 'G', 'B', 'I', 'V' };
            int numEggs = Integer.parseInt(line);
            int dived7 = numEggs / 7;
            StringBuilder eggsColour = new StringBuilder();
            for (int i = 0; i < (dived7 * 7); i++) {
                eggsColour.append(colors[i % 7]);
            }

            int i = (7 - numEggs % 7);

            for (int j = 0; j < (numEggs - (dived7 * 7)); j++, i++) {
                eggsColour.append(colors[i % 7]);
            }
            System.out.println(eggsColour.toString());
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}

import java.util.Scanner;

public class EasterEggs {

    int n;
    String str = "ROYGRBIV";
    // ROYGBIV
    public void solve() {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        //n = 10;
        for (int i=0; i<n; i++) {
            System.out.print(str.charAt(i%8));
        }

    }

    public static void main(String[] args) {
        new EasterEggs().solve();
    }
}

import java.util.*;

public final class Solution
{
	public static void main(String[] args)
	{
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		String result = "";
		while( n - 7 >= 0)
		{
			result = result + "ROYGBIV";
			n -= 7;
		}
		if(n != 1)
		{
			char[] colors = {'R','O','Y','G','B','I','V'};
			for(int i = 0 ; i < n ; i++)
				result += colors[i];
		}
		else
		{
			result += "O";
		}
		System.out.println(result);
		input.close();
	}
}

import java.util.*;

public class A{
		static int MaxN=(int)1e6;
static Scanner scan=new Scanner(System.in);
static int [] reverse(int a[], int n)
    {
        int[] b = new int[n];
        int j = n;
        for (int i = 0; i < n; i++) {
            b[j - 1] = a[i];
            j = j - 1;
        }
return b;
         }
static int []ret(int ar[]){

int bol[]=new int[MaxN];
Arrays.fill(bol,-1);
  for (int i : ar) {
      bol[i] = 1;
    }
return bol;
}
public static void main(String[] args)
{
	int n=scan.nextInt();
	String s="";
if(n==7){
	s+="ROYGBIV";

System.out.println(s);
return;
}

	if(n%7==0){
	for(int i=0;i<n;i+=7){
s+="ROYGBIV";

	}
	System.out.println(s);
return;
}
	else {
		int mod=n%7;
		n=n-mod;
		for(int i=0;i<n;i+=7){
			s+="ROYGBIV";
		}
		if(mod==1)
		s+="G";
	else if(mod==2)
		s+="GB";
	else if(mod==3)
		s+="GBI";
	else if(mod==4)
		s+="GBIV";
	else if(mod==5)
		s+="GBIVY";
	else if(mod==6)
		s+="GBIVYG";

		System.out.println(s);
		return;

	}}

}

import java.util.Scanner;
public class Main
{

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int size = sc.nextInt();
        String output = "ROYGBIV";

        System.out.print(output);

            for(int j=8;j<=size;j++)
            {
                if(j%7 == 1 || j%7 == 5)
                    System.out.print(output.charAt(3));
                else if(j%7 == 2 || j%7 == 6)
                    System.out.print(output.charAt(4));
                else if (j%7 == 3)
                    System.out.print(output.charAt(5));
                else if(j%7 == 4)
                    System.out.print(output.charAt(6));

            }

        System.out.println();
    }

}

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		String s="";
		int k=0;
		String u="ROYGBIV";
		for(int i=0;i<n;i++){
			s+=""+u.charAt(k);
			k+=1;
			if(k==7){
				k=0;
			}
		}
		System.out.println(s);
	}
}

//EasterEggs
import java.io.*;
import java.util.*;
public class EasterEggs{
static int t,n;
static int[] arr;
static StringBuilder ans=new StringBuilder();
public static void  solve(){
	int que=n/7;
	while(que--!=0){
		ans.append("ROYGBIV");
	}
	int rem=n/7;
	switch(rem){
		case 0:ans.append("");break;
		case 1:ans.append("G");break;
		case 2:ans.append("GB");break;
		case 3:ans.append("GBI");break;
		case 4:ans.append("GBIV");break;
		case 5:ans.append("YGBIV");break;
		case 6:ans.append("OYGBIV");break;
	}

}
public static void main(String[] args) throws IOException{
		// BufferedReader br = new BufferedReader(new
  //      FileReader("sampleinp.txt"));
    	BufferedReader br = new BufferedReader(
                             new InputStreamReader(System.in));

	 	n=Integer.parseInt(br.readLine());
	 	solve();
		System.out.println(ans.toString());

    }
}

import java.io.*;
import java.util.*;

public class EasterEggs {
  public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        String x = "ROYGBIV";
        String y = "GBIV";
        int mod = 0;
        if(n<7){
            for (int i = 0; i < n; i++) {
                System.out.print(x.charAt(i));
            }
            System.out.println("");
        }
        else{
             for (int i = 0; i < n/7; i++) {
                 System.out.print(x);
              }
            if((n%7)/4 >0){
                System.out.print(y);
                mod = (n%7)%4;
             }

        for (int i = 0; i < mod; i++) {
            System.out.print(y.charAt(i));
        }
            System.out.println("");
        }

  }
}

import java.io.*;
import java.util.InputMismatchException;

public class CF78 {
    static String filePath = "/home/bishoy/IdeaProjects/Arabic competetive programming/src/b/test";

    public static void main(String args[]) {
        InputReader inputReader = Helper.readInput(Helper.Input.STD, filePath);
        OutputWriter out = new OutputWriter(System.out);
        int n = inputReader.readInt();
        String colors = "ROYGBIV";
        StringBuilder stringBuilder = new StringBuilder();
        int i = 0;
        while (stringBuilder.length() < n) {
            if (i <= 6) {
                stringBuilder.append(colors.charAt(i));
            } else {
                stringBuilder.append(colors.charAt(3)); //4-1
                i = 0;
            }
            i++;
        }
        out.printLine(stringBuilder);

    }

    int getRelativelyPrime(int n) {
        for (int i = 2; i < n; i++) ;
        return 0;
    }

    static long gcd(long a, long b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }

    static class Helper {
        static InputReader inputReader = null;
        static OutputWriter out = null;

        public static enum Input {
            FILE, STD
        }

        public static class Pair<K, V> {
            public K key;
            public V value;

            public Pair(K key, V value) {
                this.key = key;
                this.value = value;
            }

            @Override
            public String toString() {
                return "( " + key + " , " + value + ")";
            }
        }

        public static InputReader readInput(Enum type, String filePath) {
            if (type == Input.FILE) {
                try {
                    inputReader = new InputReader(new FileInputStream(new File(filePath)));
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                }
            } else
                inputReader = new InputReader(System.in);

            return inputReader;
        }

        public static boolean validIndices(int r, int c, int n, int m) {
            if (r >= 0 && c >= 0 && r < n && c < m) return true;
            else return false;
        }
    }

    private static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public double readDouble() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E') {
                    return res * Math.pow(10, readInt());
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E') {
                        return res * Math.pow(10, readInt());
                    }
                    if (c < '0' || c > '9') {
                        throw new InputMismatchException();
                    }
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public long readLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    private static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
            writer.flush();
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
            writer.flush();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }
    }

}

import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author codeKNIGHT
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, Scanner in, PrintWriter out) {
        int n=in.nextInt()-7,i;
        String s="VIB";

        char a[]={'V','I','B','G','Y','O','R'};
        for(i=0;i<n;i++)
            s+=a[6-i%7];
        out.println(s+"GYOR");
	}
}

import java.lang.*;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
public class MyClass {
    public static void main(String args[])throws Exception {
        Scanner sc=new Scanner(System.in);

    int n=sc.nextInt();
   String s="VIBGYORBG";

   String a="";
   while(a.length()<n)
   {int p=n-a.length();
   if(p>9)
   p=9;
       a+=s.substring(0,p);
   }
  System.out.println(a);

}

}

import java.util.Scanner;

public class EasterEggs {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        char a[] = {'R','O','Y','G','B','I','V'};

        int n = input.nextInt();
        if((n-1)%7!=0){
            while(n>=7){
                for (int i = 0; i < a.length; i++) {
                    System.out.print(a[i]);
                }
                n-=7;
            }
            for (int i = 0; i < n; i++) {
                System.out.print(a[i]);
            }
            System.out.println("");
        }
        else{
            while(n>=7){
                for (int i = 0; i < a.length; i++) {
                    System.out.print(a[i]);
                }
                n-=7;
            }
            System.out.println(a[3]);
        }
}

}

import java.util.Scanner;

public class EasterEggs {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int eggsNum = s.nextInt();
        String baseEggs = "ROYGBIV";
        int j = 0;
        StringBuilder res = new StringBuilder();
        for(int i = 1; i <= eggsNum; i++) {
            res.append(baseEggs.charAt(j));
            j = (j+1) % baseEggs.length();
        }
        System.out.println(res.toString());
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Easter_Eggs {
     static char[] arr = {'R','O','Y','G','B','I','V'};
     static boolean [] check = new boolean[7];
     public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.flush();
    }
     static class TaskA{
        void solve(int test , InputReader in , PrintWriter out){
         int n = in.nextInt();
         int mod = 1;
         int x = 0;
            for (int i = 0; i < n/7; i++) {
                    out.print("ROYGBIV");
            }
//            n =(int) Math.ceil(n/7
            n %= 7;
            for (int i = 0; i < n; i++) {
                out.print(arr[i+1]);
            }
     }
     }
       static class InputReader{
       public BufferedReader reader;
       public StringTokenizer tk;
       public InputReader(InputStream stream){
           reader = new BufferedReader(new InputStreamReader(stream));
           tk = null;
       }
       String next(){
           while (tk == null || !tk.hasMoreTokens()) {
               try{
                   tk = new StringTokenizer(reader.readLine());
               }
               catch(IOException e){
                   throw new RuntimeException();
               }
           }
           return tk.nextToken();
       }
       int nextInt(){
           return Integer.parseInt(next());
       }
   }
}

import java.util.*;
public class JavaApplicationM{
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int n=in.nextInt(),j=0;
//----------------------------------------------
String s[]={"R","O","Y","G","R","B","I","V"};

for(int i=0;i<n;i++)
{
 System.out.print(s[j]);
 j++;
 if(j==8)j=0;
}

}}

import java.util.Scanner;

public class EasterEggs {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		char[] colors = new char[] {'R', 'O', 'Y', 'G', 'B', 'I', 'V'};

		int n = sc.nextInt();
		int mod = n % 7;
		int div = n / 7;
		for (int i = 0; i < div; i++) {
			System.out.print("ROYGBIV");
		}

		if (mod >= 4) {
			for (int i = 0; i < mod; i++) {
				System.out.print(colors[i]);
			}
		} else {
			for (int i = 0; i < mod; i++) {
				System.out.println(colors[3 + i]);
			}
		}

	}

}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

/*complexity      maximum N
 O(log(n))       10^18
 O(N)            10^8
 O(N log N)      10*4^7
 O(N2)           10^4
 O(N3)           500
 O(N4)           90
 O(2^N)          20
 O(N!)           11*/
public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        byte n = Byte.parseByte(bf.readLine()), i = 0;
        StringBuilder s = new StringBuilder("ROYGBIV");
        char ch[] = {'R', 'O', 'Y', 'G', 'B', 'I', 'V'};
        n -= 7;
        while (n-- > 0) {
            s.append(ch[i]);
            if (i < 7) {
                i++;
            } else {
                i = 0;
            }
        }
        System.out.println(s);
    }
}

import java.util.*;
import java.io.*;

public class b78
{
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		char[] arr = "ROYGBIV".toCharArray();

		for(n = 7; n <= 100; n++)
		{
			String meh = "";
			for(int i = 0; i < 7; i++)
				meh+=arr[i];
			for(int i = 0; i < n-7; i++)
				for(int j = 0; j < 7; j++)
					if(canWork(arr[j],meh))
					{
						meh+=arr[j];
						break;
					}
			System.out.println(meh + " " +meh.length());
		}
	}

	public static boolean canWork(char l, String m)
	{
		if(m.length()<7)
			return true;
		for(int i = 0; i < 3; i++)
			if(m.charAt(i)==l)
				return false;
		for(int i = 0; i < 3; i++)
			if(m.charAt(m.length()-1-i)==l)
				return false;
		return true;
	}
}

import java.io.*;
import java.util.*;
import java.util.Queue;
import java.util.LinkedList;
import java.util.Stack;

public class Main
{
    @SuppressWarnings("unchecked")

      public static void main(String args[])throws IOException
    {
         Reader ob=new Reader();
        Writer out=new Writer(System.out);
        Random oo=new Random();
       int n=ob.nI();
       char c[]="VIBGYORG".toCharArray();
       while(n-->0)
       out.p(c[n%8]);
        out.flush();
}
static void sort(int a[])
{
    RA(a);
    Arrays.sort(a);
}
 public static int[] RA(int [] array){
		Random rgen = new Random();  // Random number generator

		for (int i=0; i<array.length; i++) {
		    int randomPosition = rgen.nextInt(array.length);
		    int temp = array[i];
		    array[i] = array[randomPosition];
		    array[randomPosition] = temp;
		}

		return array;
	}
	static void sort(long a[])
{
    RA(a);
    Arrays.sort(a);
}
 public static long[] RA(long [] array){
		Random rgen = new Random();  // Random number generator

		for (int i=0; i<array.length; i++) {
		    int randomPosition = rgen.nextInt(array.length);
		    long temp = array[i];
		    array[i] = array[randomPosition];
		    array[randomPosition] = temp;
		}

		return array;
	}
	static void sort(String a[])
{
    RA(a);
    Arrays.sort(a);
}
 public static String[] RA(String [] array){
		Random rgen = new Random();  // Random number generator

		for (int i=0; i<array.length; i++) {
		    int randomPosition = rgen.nextInt(array.length);
		    String temp = array[i];
		    array[i] = array[randomPosition];
		    array[randomPosition] = temp;
		}

		return array;
	}
static long inverse(long x, long p)
    {
        return pow(x, p - 2, p);
    }
static boolean isPrime(long n)
{
    long h=(long)Math.sqrt(n);
    for(long i=2;i<=h;i++)
    if(n%i==0)
    return false;
    return true&&n!=1;
}
    static long gcd(long a,long b)
    {
        if(a<b)
        return gcd(b,a);
        else if(b==0)
        return a;
        else
        return gcd(b,a%b);
    }
    static long pow(long a,long b,long mod){
		if(b == 0)	return 1;
		long t = pow(a,b>>1,mod);
		t = (t * t) % mod;
		if((b & 1) == 1)	t = (t * a);
		if(t >= mod)	t %= mod;
		return t;
}
    static long pow(long a,long b){
		if(b == 0)	return 1;
		long t = pow(a,b>>1);
		t = (t * t);
		if((b & 1) == 1)	t = (t * a);
		return t;
}
    static void seive(int n,int prime[])//1 for prime -1 for not prime
    {
        for(int i=2;i<=n;i++)
            if(prime[i]==0)
            {
                prime[i]=1;
                for(int j=2;j*i<=n;j++)
                prime[j*i]=-1;
            }
    }
    static int max(int ...a)
    {
        int m=a[0];
        for(int i=0;i<a.length;i++)
        m=Math.max(m,a[i]);
        return m;

    }
    static long max(long ...a)
    {
        long m=a[0];
        for(int i=0;i<a.length;i++)
        m=Math.max(m,a[i]);
        return m;
    }
    static int min(int ...a)
    {
        int m=a[0];
        for(int i=0;i<a.length;i++)
        m=Math.min(m,a[i]);
        return m;
    }
    static long min(long ...a)
    {
        long m=a[0];
        for(int i=0;i<a.length;i++)
        m=Math.min(m,a[i]);
        return m;
    }
    static class Pair<T1,T2>
    {
        T1 x;T2 y;
        Pair(T1 xx,T2 yy)
        {
            x=xx;
            y=yy;
        }
    }

	static class Writer {
		private final PrintWriter p;
		Writer(OutputStream o) {
			p = new PrintWriter(new BufferedWriter(new OutputStreamWriter(o)));
		}
		void p(Object... o1) {
			for (Object o11 : o1) {
				p.print(o11 + "" );
			}
		}
		void p(String s) {
			p.print(s);
		}
		void pln(Object... o1) {
			p(o1);
			p.println();
		}
		void flush() {
			p.flush();
		}
		void close() {
			p.close();
		}
	}
    static class Reader {
		private byte[] buf = new byte[1024];
		private int curChar;
		private int snumChars;
		int flag=0;
		FileReader file;
		Reader()
		{
		  }
		  Reader(String x)throws IOException
		  {
		      flag=1;
		      file=new FileReader(x);
		  }
		public int read() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = System.in.read(buf);

				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nl() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public String n() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public long nL() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nI() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int[] NIA(int n) //nextINtArray
		{
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nI();
			}
			return arr;
		}
		public int[] NIA1(int n) //nextINtArray
		{
			int[] arr = new int[n+1];
			for (int i = 1; i <=n; i++) {
				arr[i] = nI();
			}
			return arr;
		}

		public long[] NLA(int n) //nextLongArray
		{
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nL();
			}
			return arr;
}
		public long[] NLA1(int n) //nextLongArray
		{
			long[] arr = new long[n+1];
			for (int i = 1; i <=n; i++) {
				arr[i] = nL();
			}
			return arr;
}
		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}
static class DSU
{
    int a[],size[],c=1,m;
    HashMap<String,Integer> hm=new HashMap<String,Integer>();
    DSU(int n)
    {
        a=new int[n+1];
        m=n;
        size=new int[n+1];
        for(int i=1;i<=n;i++)
    {
        a[i]=i;
        size[i]=1;
    }
    }
    void add(String x,int i)
    {
        hm.put(x,i);
    }
    int find(int n)
    {
        while(a[n]!=n)
        {
            a[n]=a[a[n]];
        n=a[n];
    }
        return n;
    }
    int[] eval()
    {
       int y[]=new int[m+1];
       for(int i=1;i<=m;i++)
       y[find(i)]++;
       return y;
    }
    void union(int a1,int b)
    {
        int x=find(a1);
        int y=find(b);
        if(size[x]>size[y])
    {
        a[y]=x;
        size[x]+=size[y];
    }
    else
    {
       a[x]=y;
       size[y]+=size[x];
    }
}
        //System.out.println(Arrays.toString(a));
     int query(String x,String y)
     {
         int p=-1,q=-1;
         if(hm.containsKey(x))
         p=hm.get(x);
         else
         {
             p=c;
         hm.put(x,c++);

        }
         if(hm.containsKey(y))
         q=hm.get(y);
         else
         {
             q=c;
         hm.put(y,c++);
        }
        int m=find(p),n=find(q);
        if(m!=n)
        {
        union(m,n);
            return 2;
        }
        else
        return 1;
}
}
class Segment
{
    int sum[];
    void build(int a[],int v,int l,int r)
    {
        if(l==r)
        sum[v]=a[l];
        else
        {
            int m=(l+r)/2;
            build(a,v*2,l,m);
            build(a,2*v+1,m+1,r);
            sum[v]=sum[v*2]+sum[2*v+1];
        }
    }
    void update(int a[],int l,int r,int x,int v,int y)
    {
        if(l==r&&r==y)
            sum[v]+=x;
        else if(l>y||y>r)
        return;
        else
        {
            int m=(l+r)/2;
            update(a,l,m,x,2*v,y);
            update(a,m+1,r,x,2*v+1,y);
            sum[v]=sum[2*v]+sum[2*v+1];
        }
    }
    int query(int v,int l,int r,int x,int y)
    {
        if(x>r||y<l)
        return 0;
        else if(x<=l&&r<=y)
        return sum[v];
        else
        {
            int m=(l+r)/2;
        return query(2*v,l,m,x,y)+query(2*v+1,m+1,r,x,y);
    }
}
}

static class Trie
  {
      Trie child[]=new Trie[26];
      int count=0;
    }
   /* void insert(String a)
    {
        Trie tmp=root;
        for(int i=0;i<a.length();i++)
        {
            int v=a.charAt(i)-'a';
            if(tmp.child[v]==null)
            {
                tmp.child[v]=new Trie();

            }
                tmp=tmp.child[v];
            }
            if(tmp.count==0)
            r++;
            tmp.count=1;
        }*/
    }

import java.util.Scanner;

public class EasterEggs {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();

        final String colors = "ROYGRBIV";

        final String colorsAtNEqualSeven = "ROYGBIV";

        int colorsIndex = 0;

        if (n == 7) {
            System.out.println(colorsAtNEqualSeven);
            return;
        }

        for (int i = 0; i < n; i++) {

            if (colorsIndex == 8)
                colorsIndex = 0;

            if (i == (n - 1)) {

                if (colors.charAt(colorsIndex) == colors.charAt(0)) {
                    colorsIndex++;
                }
            }
            System.out.print(colors.charAt(colorsIndex));
            colorsIndex++;

        }
    }
}

import java.util.*;
public class B78 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String s = "ROYGBIV";
        while (n>7) {
            System.out.print(s);
            n-=7;
        }
        if (n==1) {
            System.out.println("G");
        }
        if (n==2) {
            System.out.println("GY");
        }
        if (n==3) {
            System.out.println("IBG");
        }
        if (n==4) {
            System.out.println("GBIV");
        }
        if (n==5) {
            System.out.println("GBYIV");
        }
        if (n==6) {
            System.out.println("GOBYIV");
        }
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class EasterEggs {

	public static void main(String[] args) throws NumberFormatException, IOException
	{
		char [] colors = {'R', 'O', 'Y', 'G', 'B', 'I', 'V'};
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		char [] array = new char [n];

		for(int i = 0; i < n; i++)
			array[i] = colors[i % 7];

		System.out.println(array);
	}

}

public class B {
    public static void main(String[] args) {
        String[] c = { "R", "O", "Y", "G", "B", "I", "V" };
        n = new java.util.Scanner(System.in).nextInt();
        p = new int[n];
        f(0, 1);
        for(int i = 0; i < n; ++i){
            System.out.print(c[p[i]-1]);
        }
        System.out.println();
    }

    static int n;
    static int[] p;
    static int[] bc = new int[8];

    static boolean f(int i, int c) {
        if(i == n){
            for(int j = 1; j <= 7; ++j){
                if(bc[j] < 1){
                    return false;
                }
            }
            return true;
        }
        ++bc[c];
        p[i] = c;
        boolean[] b = new boolean[8];
        for (int d = -3; d <= 3; ++d) {
            int j = i + d;
            if(j >= n){
                j -= n;
            }else if(j < 0){
                j += n;
            }
            b[p[j]] = true;
        }
        for (int j = 1; j <= 7; ++j) {
            if (!b[j] && f(i + 1, j)){
                return true;
            }
        }
        --bc[c];
        p[i] = 0;
        return false;
    }
}

import java.util.Scanner;
public class acm
{
public static void main(String[] args)
{

	Scanner in=new Scanner(System.in);
	int n =in.nextInt();
	int first[]=new int [30];
	int last[]=new int [30];
	String res="ROYGBIV";
	for(int i=0;i<7;i++){
		first[res.charAt(i)-'A']=i;last[res.charAt(i)-'A']=i;}
	for(int i=7;i<n;i++)
	{

	for(int j=0;j<7;j++)
	{

		int ix1=last[res.charAt(j)-'A'];
		int ix2=first[res.charAt(j)-'A'];
		boolean f =true ;
		if(i-ix1+1<=4)
			f=false;
		if((n-i)+(ix2+1)<=4)
			f=false;

		if(f)
		{

			last[res.charAt(j)-'A']=i;
			res+=res.charAt(j);

		}

	}

	}
	System.out.println(res);

}
}

import java.util.Scanner;

public class EasterEggs {
    public static void main (String ... args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        String colors = "ROYGBIV";
        StringBuilder result = new StringBuilder();
        for (int i=0; i<n/7; i++){
            result.append(colors);
            colors = colors.substring(3) + colors.substring(0, 3);
        }
        result.append(colors.substring(0, n%7));
        System.out.println(result);
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Scanner;
import java.util.Arrays;
import java.util.StringTokenizer;

public class sample {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String[] colors = { "R", "O", "Y", "G", "B", "I", "V" };
        String c1 = "ROYG";
        String c2 = "VIBG";
        String ans = "";
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            if (i % 4 == 0 && (cnt+1)*4 < n){
                if (cnt % 2 == 0)
                    ans += c1;
                else
                    ans += c2;
                cnt++;
            }else if(i == n-1&&4*cnt < n){
                if(cnt%2==0)
                    ans+= c1.substring(0,n-4*cnt);
                else
                    ans+= c2.substring(0,n-4*cnt);
            }
        }
        System.out.println(ans);
    }
}

import java.io.*;
import java.util.*;

public class Task implements Runnable {
    FastReader in;
    PrintWriter out;

    public void solve() throws IOException {
        final String color = new String("ROYGBIV");
        int n = in.nextInt();
        for (int i = 0; i < n / 4; ++i) {
            out.print(color.substring(0, 4));
        }
        out.println(color.substring(4, 4 + n % 4));
    }

    public void run() {
        try {
            in = new FastReader();
            out = new PrintWriter(System.out);
            solve();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    public static void main(String[] args) throws IOException {
        new Task().run();
    }
}

class FastReader {
    BufferedReader br;
    StringTokenizer in;

    FastReader() {
        this.br = new BufferedReader(new InputStreamReader(System.in));
    }

    FastReader(String filename) {
        try {
            this.br = new BufferedReader(new FileReader(filename));
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    public String nextToken() throws IOException {
        while (in == null || !in.hasMoreTokens()) {
            in = new StringTokenizer(br.readLine());
        }
        return in.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
}

import java.io.*;
import java.util.*;

public class Main {
    void solve() throws IOException {
        int n = nextInt();
        char[] col = {'R','O','Y','G','B','I','V'};
        int cur = 0;
        String s = new String();
        for( int i = 0; i < n-1; i++ ){
            s+=col[cur];
            cur++;
            if( cur >= col.length )
                cur=0;
        }

        for( int i = 0; i < col.length; i++ ){
            if( (col[i]!=s.charAt(0)) && (col[i]!=s.charAt(1)) &&(col[i]!=s.charAt(2)) && (col[i]!=s.charAt(s.length()-1)) && (col[i]!=s.charAt(s.length()-2))&& (col[i]!=s.charAt(s.length()-3)) ){
                s+=col[i];
                break;
            }
        }
        out.println(s);
    }

    private static final String INPUT_FILE = "inp.txt";

    public static void main(String[] args) throws IOException {
        if (new File(INPUT_FILE).exists())
            System.setIn(new FileInputStream(INPUT_FILE));
        new Main().solve();
	out.close();
    }

    private BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    private static PrintWriter out = new PrintWriter(System.out);;
    private StringTokenizer st = new StringTokenizer("");

    String nextToken() throws IOException {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextLine() throws IOException {
        st = new StringTokenizer("");
        return in.readLine();
    }

}

import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author codeKNIGHT
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, Scanner in, PrintWriter out) {
        int n=in.nextInt(),i;
        String s="";
        while (n-7>=0)
        {
            s+="VIBGYOR";
            n-=7;
        }
        char a[]={'V','I','B','G','Y','O'};
        for(i=0;i<n;i++)
            s+=a[i];
        out.println(s);
	}
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {

    public static int countvowel(String s) {
        int n = 0;
        for (int x = 0; x < s.length(); x++) {
            if (s.charAt(x) == 'a' || s.charAt(x) == 'i'|| s.charAt(x) == 'u' || s.charAt(x) == 'e' || s.charAt(x) == 'o') {
                n++;
            }
        }
        return n;
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int n = scan.nextInt(), y = 0;
        String x = "ROYGBIV", result;
        for (int a = 0; a < n; a++) {
            System.out.print(x.charAt(y));
            y++;
            if (y == 7) {
                y = 0;
            }
        }
        System.out.println();
    }
}

import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
import java.util.Comparator;

public class scratch_25 {
    static class Reader {
        static BufferedReader reader;
        static StringTokenizer tokenizer;

        /**
         * call this method to initialize reader for InputStream
         */
        static void init(InputStream input) {
            reader = new BufferedReader(
                    new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }

        /**
         * get next word
         */
        static String next() throws IOException {
            while (!tokenizer.hasMoreTokens()) {
                //TODO add check for eof if necessary
                tokenizer = new StringTokenizer(
                        reader.readLine());
            }
            return tokenizer.nextToken();
        }

        static int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        static long nextLong() throws IOException {
            return Long.parseLong(next());
        }
    }

    static class ans {
        int a;
        int b;

        public ans(int a, int b) {
            this.a = a;
            this.b = b;

        }
    }

    static class sort implements Comparator<ans> {

        @Override
        public int compare(ans a1, ans a2) {
            return a1.b - a2.b;
        }

    }

    public static void main(String[] args) throws IOException {
        Reader.init(System.in);
       int n= Reader.nextInt();
       String str= "ROYGBIV";
     //  String str1= "GBIVY";
       String s="";
       int count=0;
        for (int i = 0; i <n/7 ; i++) {
            s+=str;
            count+=7;
        }
        s+=str.substring(n-count);
        System.out.println(s);

        }

    public static char[] getCharArray(char[] array) {
        String _array = "";
        for(int i = 0; i < array.length; i++) {
            if(_array.indexOf(array[i]) == -1) // check if a char already exist, if not exist then return -1
                _array = _array+array[i];      // add new char
        }
        return _array.toCharArray();
    }

    static void merge(long arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[] = new long [n1];
        long R[] = new long [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    static void sort(long arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
    static boolean ans(int check, long arr[],int n,int med,int k){
        long ans=0;
        for (int i = med; i <n ; i++) {
            if(check>=arr[i]){
                ans+=check-arr[i];
            }
        }
        return ans<=k;

    }

    static boolean isPrime(long n)
    {
        // Corner cases
        if (n <= 1) return false;
        if (n <= 3) return true;

        // This is checked so that we can skip
        // middle five numbers in below loop
        if (n % 2 == 0 || n % 3 == 0) return false;

        for (long i = 5; i * i <= n; i = i + 6)
            if (n % i == 0 || n % (i + 2) == 0)
                return false;

        return true;
    }

    static   int partition(double arr[],int arr1[],int arr2[], int low, int high)
    {
        double pivot = arr[high];
        int i = (low-1); // index of smaller element
        for (int j=low; j<high; j++)
        {
            // If current element is smaller than the pivot
            if (arr[j] < pivot)
            {
                i++;

                // swap arr[i] and arr[j]
                double temp = arr[i];
                arr[i] = arr[j];
                arr[j] = temp;
                int temp1=arr1[i];
                arr1[i]=arr1[j];
                arr1[j]=temp1;
                int temp2=arr2[i];
                arr2[i]=arr2[j];
                arr2[j]=temp2;

            }
        }

        // swap arr[i+1] and arr[high] (or pivot)
        double temp = arr[i+1];
        arr[i+1] = arr[high];
        arr[high] = temp;
        int temp1= arr1[i+1];
        arr1[i+1]=arr1[high];
        arr1[high]= temp1;
        int temp2= arr2[i+1];
        arr2[i+1]=arr2[high];
        arr2[high]= temp2;

        return i+1;
    }

    /* The main function that implements QuickSort()
      arr[] --> Array to be sorted,
      low  --> Starting index,
      high  --> Ending index */
    static void sort(double arr[],int arr1[],int arr2[], int low, int high)
    {
        if (low < high)
        {
            /* pi is partitioning index, arr[pi] is
              now at right place */
            int pi = partition(arr,arr1,arr2, low, high);

            // Recursively sort elements before
            // partition and after partition
            sort(arr,arr1,arr2, low, pi-1);
            sort(arr,arr1, arr2,pi+1, high);
        }
    }
    static int removeDuplicates(int arr[], int n)
    {
        // Return, if array is empty
        // or contains a single element
        if (n==0 || n==1)
            return n;

        int[] temp = new int[n];

        // Start traversing elements
        int j = 0;
        for (int i=0; i<n-1; i++)
            // If current element is not equal
            // to next element then store that
            // current element
            if (arr[i] != arr[i+1])
                temp[j++] = arr[i];

        // Store the last element as whether
        // it is unique or repeated, it hasn't
        // stored previously
        temp[j++] = arr[n-1];

        // Modify original array
        for (int i=0; i<j; i++)
            arr[i] = temp[i];

        return j;
    }
    static long maxPrimeFactors( long n)
    {
        // Initialize the maximum prime
        // factor variable with the
        // lowest one
        long maxPrime = -1;

        // Print the number of 2s
        // that divide n
        while (n % 2 == 0) {
            maxPrime = 2;

            // equivalent to n /= 2
            n >>= 1;
        }

        // n must be odd at this point,
        // thus skip the even numbers
        // and iterate only for odd
        // integers
        for (int i = 3; i <= Math.sqrt(n); i += 2) {
            while (n % i == 0) {
                maxPrime = i;
                n = n / i;
            }
        }

        // This condition is to handle
        // the case when n is a prime
        // number greater than 2
        if (n > 2)
            maxPrime = n;

        return maxPrime;
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			int n = Integer.parseInt(br.readLine());

			int x = n-3;
			int y = x/4;
			int z = x%4;

			String rep = "ROYG";
			String rep1 = "";

			int cont = 1;
			int cont1 = 0;
			int i=0;

			while(cont<y){
				rep+=rep;
				cont++;
			}

			while(cont1<z){
				rep1+= rep.charAt(i);
				i++;
				if(i==4){
					i=0;
				}
				cont1++;
			}

			rep1=rep+rep1+"BIV";
			System.out.println(rep1);
		} catch (NumberFormatException | IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}

/******************************************************************************

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.

*******************************************************************************/

import java.util.Scanner;

public class Main
{
	public static void main(String[] args) {

		char arr[] = {'R','O','Y','G','B','I','V'};

		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		char out[] = new char[n];

		int j=0;
		for(int i =0;i<n;i++){
		    if(i>6){

		       out[i]=arr[j];
		       j++;
		       if(j>6){
		           j=0;
		       }
		    }else{
		       out[i]=arr[i];
		    }
		}
		for(int a=0;a<n;a++){
		System.out.print(out[a]);
		}

	}
}

import java.util.Scanner;
public class Acm {
    public static void main(String[] args) {

        Scanner input = new Scanner(System.in) ;
       int size = input.nextInt();
        char[] arr =new char[7];
        arr[0]='R';arr[1]='O';arr[2]='Y';arr[3]='G';arr[4]='B';arr[5]='I';arr[6]='V';

        char []output = new char [size];
        output[size-1]='a';
        for(int i=0;i<7;i++)
            output[i]=arr[i] ;
        int x =0 ;

        for(int i=7;i<i+1;i++)
        {
            if(size==7)
                  break ;

            if(x>6)
                 x=0;
            char y = arr[x];
            if(y!=output[i-1]&&y!=output[i-2]&&y!=output[i-3]&&y!=output[i-4])
            {
              //  System.out.println((i+1)%size); System.out.println((i+2)%size);
                // System.out.println((i+3)%size); System.out.println((i+4)%size);
                if(y==output[(i+1)%size]&&y==output[(i+2)%size]&&y==output[(i+3)%size]&&y==output[(i+4)%size])
                { i--; }
                else
                   output[i]=y;

            }
            else
                i--;
            x++ ;
            if(output[size-1]!='a')//
                break ;
            }

        for(int i=0;i<size;i++)
         System.out.print(output[i]);

 //int x = input.nextInt();
// System.out.print(10%10);
    }
}

import java.util.*;

public class Main {
    static int a=0;static int b=0;static int cc=0;

    public static void main(String[] args) {
Scanner in=new Scanner(System.in);
 ArrayList<Character> ar=new ArrayList();
int n=in.nextInt();
String s="ROYGBIV";
int loop=n/7;
for (int i=0;i<loop;i++){
    System.out.print(s);
}
int mod=n%7;

System.out.println(s.substring(0,mod));
    }
}

import java.io.File;
import java.io.FileNotFoundException;
    import java.util.*;
import javafx.util.Pair;

   public class Main {

    public static void main(String[] args) throws FileNotFoundException{
//        File f = new File("input.txt");
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        String s = "ROYGBIVG";
        StringBuilder ans = new StringBuilder();
        for (int i = 1; i <=n/8; i++) {
            ans.append(s);
        }
        for (int i = 0; i <n%8; i++) {
            ans.append(s.charAt(i));
        }
        System.out.println(ans);

    }

}

import java.util.Scanner;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Ura
 */
public class _78B {

    public static String right3(String str, char[] charArr) {
        String res = "";
        int l = charArr.length;
        char[] tempArr = new char[3];

        int strN = str.length();
        char[] compareArr = new char[9];
        compareArr[0] = str.charAt(2);
        compareArr[1] = str.charAt(1);
        compareArr[2] = str.charAt(0);

        compareArr[6] = str.charAt(strN - 1);
        compareArr[7] = str.charAt(strN - 2);
        compareArr[8] = str.charAt(strN - 3);

        c:
        for (int i = 0; i < l; i++) {
            tempArr[0] = charArr[i];
            a:
            for (int j = 0; j < l; j++) {
                if (j != i) {
                    tempArr[1] = charArr[j];
                    b:
                    for (int k = 0; k < l; k++) {
                        if (k != i && k != j) {// тут то мы и получаем перестановки в количестве 7*6*5
                            tempArr[2] = charArr[k];

                            compareArr[3] = tempArr[0];
                            compareArr[4] = tempArr[1];
                            compareArr[5] = tempArr[2];
                            for (int ii = 3; ii <= 5; ii++) {
                                for (int jj = 0; jj < compareArr.length; jj++) {
                                    if (ii != jj && (jj >= ii - 3 && jj <= ii + 3)) {
                                        if (ii == 3 && compareArr[ii] == compareArr[jj]) {
                                       //     System.out.println("ii=" + ii + " jj=" + jj + "compareArr=" + new String(compareArr));
                                            continue c;
                                        }
                                        if (ii == 4 && compareArr[ii] == compareArr[jj]) {
                                      //      System.out.println("ii=" + ii + " jj=" + jj + "compareArr=" + new String(compareArr));
                                            continue a;
                                        }
                                        if (ii == 5 && compareArr[ii] == compareArr[jj]) {
                                    //        System.out.println("ii=" + ii + " jj=" + jj + "compareArr=" + new String(compareArr));
                                            continue b;
                                        }
                                    }

                                }
                            }
                            // res += tempArr[2] + tempArr[1] + tempArr[0];
                            res += new String(tempArr, 2, 1) + new String(tempArr, 1, 1) + new String(tempArr, 0, 1);
                            break c;

                        }
                    }
                }

            }
        }

        return res;
    }

    public static void main(String... args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();

        if (n >= 9) {
            char[] charArr = {'R', 'O', 'Y', 'G', 'B', 'I', 'V'};
            int count = 0;
            String str = "";

            int count7 = 0;
            while (count < n - 3) {
                if (count7 > 7 - 1) {
                    count7 = 0;
                }
                str += charArr[count7++];

                count++;
            }
            System.out.print(str + right3(str, charArr));

        } else {
            if (n == 7) {
                System.out.print("ROYGBIV");

            }
            if (n == 8) {
                System.out.print("ROYGRBIV");

            }
        }

    }
}

import java.util.*;
import java.util.ArrayList;
public class Main
{
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		int n;
		String ans="";
		n= sc.nextInt();
		while(ans.length()!=n)
		{
		    if(n- ans.length()>=4)
		    {
		        ans+= "VIBG";
		    }
		    else{
		        int k= n- ans.length();
		        if(k==3)
		        ans+= "YOR";
		        if(k==2)
		        ans+="YO";
		        if(k==1)
		        ans+= "Y";
		    }
		}
		System.out.println(ans);
	}
}

import java.util.*;

public class Main {
    private static final Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt();
        String s = "ROYGBIV", r = "RBIV";
        if (n > 7) {
            for (int i = 0; i <= n - 4; i++) {
                for (int j = 0; j < s.length(); j++) {
                    if (i < (n - 7) && checkBack(r, s.charAt(j))) {
                        r += s.charAt(j);
                        break;
                    } else if (checkFront(r, s.charAt(j), n, i) && checkBack(r, s.charAt(j))) {
                        r += s.charAt(j);
                        break;
                    }

                }
            }
        } else {
            r = s;
        }
        System.out.println(r);

    }

    private static boolean checkBack(String s, char c) {
        boolean b = true;
        for (int i = s.length() - 1; i >= s.length() - 3; i--) {
            if (s.charAt(i) == c) {
                b = false;
                break;
            }

        }
        return b;

    }

    private static boolean checkFront(String s, char c, int n, int i) {
        boolean b = true;
        for (int j = 0; j <= Math.abs(n - i - 3); j++) {
            if (s.charAt(j) == c) {
                b = false;
                break;
            }
        }
        return b;

    }
}

import java.util.*;

public class c78b
{
    private final Scanner sc;
    private static final boolean debug = true;

    static void debug(Object ... objects)
    {
        if(debug)
            System.err.println(Arrays.toString(objects));
    }

    c78b()
    {
        sc = new Scanner(System.in);
    }

    public static void main(String [] args)
    {
        (new c78b()).solve();
    }

    void solve()
    {
        int n = sc.nextInt()-7;
        String s = "ROYGBIV";
        char [] c = {'R', 'O', 'Y', 'G', 'B', 'I', 'V'};
        int j=0;
        for(int i=0;i<n;i++)
        {
            s = s+c[j];
            j=(j+1)%7;
        }

        System.out.println(s);

    }
}

import java.io.*;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

import static java.lang.Math.sqrt;

public class EasterEggs {

    public void run() throws Exception {
        String[] array = {
                "R", "O", "Y", "G", "B", "I", "V"
        };
        int numberOfEggs = nextInt();
        if (numberOfEggs >= 8) {
            int counter = 0;
            StringBuilder result = new StringBuilder("");
            for (int i = numberOfEggs; i >= 0; i--) {
                if (counter % 6 == 0) {
                    result.append(array[0]);
                    counter = 0;
                }
                counter++;
                result.append(array[counter]);
            }
            System.out.println(result);
        } else {
            Arrays.stream(array).forEach(System.out::print);
        }
    }

    public static void main(String... args) throws Exception {
        br = new BufferedReader(new InputStreamReader(System.in));
        pw = new PrintWriter(new BufferedOutputStream(System.out));
        new EasterEggs().run();
        br.close();
        pw.close();
        System.err.println("\n[Time : " + (System.currentTimeMillis() - startTime) + " ms]");
        long gct = 0, gcc = 0;
        for (GarbageCollectorMXBean garbageCollectorMXBean : ManagementFactory.getGarbageCollectorMXBeans()) {
            gct += garbageCollectorMXBean.getCollectionTime();
            gcc += garbageCollectorMXBean.getCollectionCount();
        }
        System.err.println("[GC time : " + gct + " ms, count = " + gcc + "]");
    }

    static long startTime = System.currentTimeMillis();
    static BufferedReader br;
    static PrintWriter pw;
    StringTokenizer stok;

    String nextToken() throws IOException {
        while (stok == null || !stok.hasMoreTokens()) {
            String s = br.readLine();
            if (s == null) {
                return null;
            }
            stok = new StringTokenizer(s);
        }
        return stok.nextToken();
    }

    void print(byte b) {
        print("" + b);
    }

    void print(int i) {
        print("" + i);
    }

    void print(long l) {
        print("" + l);
    }

    void print(double d) {
        print("" + d);
    }

    void print(char c) {
        print("" + c);
    }

    void print(Object o) {
        if (o instanceof int[]) {
            print(Arrays.toString((int[]) o));
        } else if (o instanceof long[]) {
            print(Arrays.toString((long[]) o));
        } else if (o instanceof char[]) {
            print(Arrays.toString((char[]) o));
        } else if (o instanceof byte[]) {
            print(Arrays.toString((byte[]) o));
        } else if (o instanceof short[]) {
            print(Arrays.toString((short[]) o));
        } else if (o instanceof boolean[]) {
            print(Arrays.toString((boolean[]) o));
        } else if (o instanceof float[]) {
            print(Arrays.toString((float[]) o));
        } else if (o instanceof double[]) {
            print(Arrays.toString((double[]) o));
        } else if (o instanceof Object[]) {
            print(Arrays.toString((Object[]) o));
        } else {
            print("" + o);
        }
    }

    void printsp(int[] a) {
        for (int i = 0, n = a.length; i < n; print(a[i] + " "), i++)
            ;
    }

    void printsp(long[] a) {
        for (int i = 0, n = a.length; i < n; print(a[i] + " "), i++)
            ;
    }

    void print(String s) {
        pw.print(s);
    }

    void println() {
        println("");
    }

    void println(byte b) {
        println("" + b);
    }

    void println(int i) {
        println("" + i);
    }

    void println(long l) {
        println("" + l);
    }

    void println(double d) {
        println("" + d);
    }

    void println(char c) {
        println("" + c);
    }

    void println(Object o) {
        print(o);
        println();
    }

    void println(String s) {
        pw.println(s);
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    char nextChar() throws IOException {
        return (char) (br.read());
    }

    String next() throws IOException {
        return nextToken();
    }

    String nextLine() throws IOException {
        return br.readLine();
    }

    int[] readInt(int size) throws IOException {
        int[] array = new int[size];
        for (int i = 0; i < size; i++) {
            array[i] = nextInt();
        }
        return array;
    }

    long[] readLong(int size) throws IOException {
        long[] array = new long[size];
        for (int i = 0; i < size; i++) {
            array[i] = nextLong();
        }
        return array;
    }

    double[] readDouble(int size) throws IOException {
        double[] array = new double[size];
        for (int i = 0; i < size; i++) {
            array[i] = nextDouble();
        }
        return array;
    }

    String[] readLines(int size) throws IOException {
        String[] array = new String[size];
        for (int i = 0; i < size; i++) {
            array[i] = nextLine();
        }
        return array;
    }

    int gcd(int a, int b) {
        if (a == 0)
            return Math.abs(b);
        if (b == 0)
            return Math.abs(a);
        a = Math.abs(a);
        b = Math.abs(b);
        int az = Integer.numberOfTrailingZeros(a), bz = Integer.numberOfTrailingZeros(b);
        a >>>= az;
        b >>>= bz;
        while (a != b) {
            if (a > b) {
                a -= b;
                a >>>= Integer.numberOfTrailingZeros(a);
            } else {
                b -= a;
                b >>>= Integer.numberOfTrailingZeros(b);
            }
        }
        return (a << Math.min(az, bz));
    }

    long gcd(long a, long b) {
        if (a == 0)
            return Math.abs(b);
        if (b == 0)
            return Math.abs(a);
        a = Math.abs(a);
        b = Math.abs(b);
        int az = Long.numberOfTrailingZeros(a), bz = Long.numberOfTrailingZeros(b);
        a >>>= az;
        b >>>= bz;
        while (a != b) {
            if (a > b) {
                a -= b;
                a >>>= Long.numberOfTrailingZeros(a);
            } else {
                b -= a;
                b >>>= Long.numberOfTrailingZeros(b);
            }
        }
        return (a << Math.min(az, bz));
    }

    boolean isPrime(int v) {
        if (v <= 1) {
            return false;
        }
        if (v <= 3) {
            return true;
        }
        if (((v & 1) == 0) || ((v % 3) == 0)) {
            return false;
        }
        for (int m = 5, n = (int) sqrt(v); m <= n; m += 6) {
            if (((v % m) == 0) || ((v % (m + 2)) == 0)) {
                return false;
            }
        }
        return true;
    }

    void rshuffle(int[] a) { // RANDOM shuffle
        Random r = new Random();
        for (int i = a.length - 1, j, t; i >= 0; j = r.nextInt(a.length), t = a[i], a[i] = a[j], a[j] = t, i--)
            ;
    }

    void qshuffle(int[] a) { // QUICK shuffle
        int m = new Random().nextInt(10) + 2;
        for (int i = 0, n = a.length, j = m % n, t; i < n; t = a[i], a[i] = a[j], a[j] = t, i++, j = (i * m) % n)
            ;
    }

    void shuffle(long[] a) {
        Random r = new Random();
        for (int i = a.length - 1; i >= 0; i--) {
            int j = r.nextInt(a.length);
            long t = a[i];
            a[i] = a[j];
            a[j] = t;
        }
    }

    void shuffle(Object[] a) {
        Random r = new Random();
        for (int i = a.length - 1; i >= 0; i--) {
            int j = r.nextInt(a.length);
            Object t = a[i];
            a[i] = a[j];
            a[j] = t;
        }
    }

    int[] sort(int[] a) {
        final int SHIFT = 16, MASK = (1 << SHIFT) - 1, SIZE = (1 << SHIFT) + 1;
        int n = a.length, ta[] = new int[n], ai[] = new int[SIZE];
        for (int i = 0; i < n; ai[(a[i] & MASK) + 1]++, i++)
            ;
        for (int i = 1; i < SIZE; ai[i] += ai[i - 1], i++)
            ;
        for (int i = 0; i < n; ta[ai[a[i] & MASK]++] = a[i], i++)
            ;
        int[] t = a;
        a = ta;
        ta = t;
        ai = new int[SIZE];
        for (int i = 0; i < n; ai[(a[i] >> SHIFT) + 1]++, i++)
            ;
        for (int i = 1; i < SIZE; ai[i] += ai[i - 1], i++)
            ;
        for (int i = 0; i < n; ta[ai[a[i] >> SHIFT]++] = a[i], i++)
            ;
        return ta;
    }

    void flush() {
        pw.flush();
    }

    void pause() {
        flush();
        System.console().readLine();
    }

}

import java.util.Scanner;
public class Ishu
{
	public static void main(String[] args)
	{
	Scanner scan=new Scanner(System.in);
	int n,i,j;
	String str="ROYGBIV";
	n=scan.nextInt();
	i=n/7;
	j=n%7;
	while(--i>0)
		str=str+str;
	switch(j)
		{
		case 6:	str=str+"OYGBIV";
			break;
		case 5:	str=str+"YGBIV";
			break;
		case 4:	str=str+"GBIV";
			break;
		case 3: str=str+"OYG";
			break;
		case 2: str=str+"YG";
			break;
		case 1:	str=str+"G";
		}
	System.out.println(str);
	}
}

import java.io.*;
import java.util.*;

public class test
{

	public static void main(String[] args)
	{
		new test().run();
	}

	void run()
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		char[] arr = new char[]
		{ 'R', 'O', 'Y', 'G', 'B', 'I', 'V' };

		int n = in.nextInt();
		for (int i = 0; i < n / 7; i++)
		{
			for (int j = 0; j < 7; j++)
				out.print(arr[j]);
		}

		for (int i = 0; i < n % 7; i++)
		{
			out.print(arr[(i + 3) % 7]);
		}
		out.close();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Easter_Eggs {
     static char[] arr = {'R','O','Y','G','B','I','V'};
     public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.flush();
    }
     static class TaskA{
        void solve(int test , InputReader in , PrintWriter out){
         int n = in.nextInt();
         int mod = 1;
            for (int i = 0; i < n; i++) {
                out.print(arr[mod]);
                mod = (mod+1)%7;
            }
     }
     }
       static class InputReader{
       public BufferedReader reader;
       public StringTokenizer tk;
       public InputReader(InputStream stream){
           reader = new BufferedReader(new InputStreamReader(stream));
           tk = null;
       }
       String next(){
           while (tk == null || !tk.hasMoreTokens()) {
               try{
                   tk = new StringTokenizer(reader.readLine());
               }
               catch(IOException e){
                   throw new RuntimeException();
               }
           }
           return tk.nextToken();
       }
       int nextInt(){
           return Integer.parseInt(next());
       }
   }
}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by akatsuki on 21/1/17.
 */
public class Easteregg {

    public static void main(String[] args) throws IOException {

        InOut io=new InOut();

        int N=io.nextInt();
        String temp="VIBGYOR";
        char[]ans=new char[N];
        for (int i = 0; i <N ; i++) {
            ans[i]=temp.charAt(i%7);
        }
        if(ans[0]==ans[N-1]){
            char c=ans[N-2];
            ans[N-2]=ans[N-1];
            ans[N-1]=c;
        }

        for (int i = 0; i <N; i++)
            io.print(ans[i]);
        io.flush();

    }
     static class InOut {

        BufferedReader br ;
        BufferedWriter bw ;
        public InOut() {
            br = new BufferedReader(new InputStreamReader(System.in));
            bw = new BufferedWriter(new OutputStreamWriter(System.out));
        }
        public InOut(InputStream in, OutputStream out) {
            br = new BufferedReader(new InputStreamReader(in));
            bw = new BufferedWriter(new OutputStreamWriter(out));
        }
        public int nextInt() throws IOException {
            return Integer.parseInt(br.readLine());
        }
        public void nextInts(String separator,int...ints ) throws IOException {
            StringTokenizer str=new StringTokenizer(br.readLine(),separator);
            int i=0;
            while (str.hasMoreTokens())ints[i++]=Integer.parseInt(str.nextToken());
        }

        public void readIntMatrix(int matrix[][],int r,int c) throws IOException {
            for (int i = 0; i < r; i++) {
                StringTokenizer str=new StringTokenizer(br.readLine()," ");
                for (int j = 0; j <c ; j++) {
                    matrix[i][j]=Integer.parseInt(str.nextToken());
                }
            }
        }

        public long nextLong() throws IOException {
            return Long.parseLong(br.readLine());
        }
        public void nextLongs(String separator,long...longs ) throws IOException {
            StringTokenizer str=new StringTokenizer(br.readLine(),separator);
            int i=0;
            while (str.hasMoreTokens())longs[i++]=Long.parseLong(str.nextToken());
        }
        public void readLongMatrix(long matrix[][],int r,int c) throws IOException {
            for (int i = 0; i < r; i++) {
                StringTokenizer str=new StringTokenizer(br.readLine()," ");
                for (int j = 0; j <c ; j++) {
                    matrix[i][j]=Long.parseLong(str.nextToken());
                }
            }
        }
        public String nextString() throws IOException {
            return br.readLine();
        }
        public void nextStrings(String delim,String...strings) throws IOException {
            StringTokenizer str=new StringTokenizer(br.readLine(),delim);
            int i=0;
            while (str.hasMoreTokens())strings[i++]=str.nextToken();
        }
        public float nextFloat() throws IOException {
            return Float.parseFloat(br.readLine());
        }
        public void nextFloats(String separator ,float...floats ) throws IOException {
            StringTokenizer str=new StringTokenizer(br.readLine(),separator);
            int i=0;
            while (str.hasMoreTokens())floats[i++]=Float.parseFloat(str.nextToken());
        }
        public void readFloatMatrix(float matrix[][],int r,int c) throws IOException {
            for (int i = 0; i < r; i++) {
                StringTokenizer str=new StringTokenizer(br.readLine()," ");
                for (int j = 0; j <c ; j++) {
                    matrix[i][j]=Float.parseFloat(str.nextToken());
                }
            }
        }
        public double nextDouble() throws IOException {
            return Double.parseDouble(br.readLine());
        }
        public void nextDoubles(String separator ,double...doubles ) throws IOException {
            StringTokenizer str=new StringTokenizer(br.readLine(),separator);
            int i=0;
            while (str.hasMoreTokens())doubles[i++]=Double.parseDouble(str.nextToken());
        }
        public void readIntMatrix(double matrix[][],int r,int c) throws IOException {
            for (int i = 0; i < r; i++) {
                StringTokenizer str=new StringTokenizer(br.readLine()," ");
                for (int j = 0; j <c ; j++) {
                    matrix[i][j]=Double.parseDouble(str.nextToken());
                }
            }
        }
        public char nextChar() throws IOException {
            return br.readLine().charAt(0);
        }
        public void nextChars(String separator,int...chars ) throws IOException {
            StringTokenizer str=new StringTokenizer(br.readLine(),separator);
            int i=0;
            while (str.hasMoreTokens())chars[i++]=Integer.parseInt(str.nextToken());
        }

        public void println(int x) throws IOException {
            bw.write(Integer.toString(x));
            bw.newLine();
        }
        public void print(int x) throws IOException {
            bw.write(Integer.toString(x));
        }
        public void println(long x) throws IOException {
            bw.write(Long.toString(x));
            bw.newLine();
        }
        public void print(long x) throws IOException {
            bw.write(Long.toString(x));
        }
        public  void print(char x) throws IOException {
            bw.write(Character.toString(x));
        }
        public  void println(char x) throws IOException {
            bw.write(Character.toString(x));
            bw.newLine();
        }
        public void flush() throws IOException {
            bw.flush();
        }
        public void print(String x) throws IOException {
            bw.write(x);
        }
        public void close() throws IOException {
            br.close();
            bw.close();
        }
    }
}

// package main;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int sizee = scanner.nextInt();
        ArrayList<String> arr = new ArrayList<>(Arrays.asList("R", "O", "Y", "G", "B", "I", "V"));
        String answer = "";

        for (int i = 0; i < sizee; i++) {
            double randomDouble = Math.random();
            randomDouble = randomDouble * 6 + 1;
            int randomInt = (int) randomDouble;
            answer += arr.get(randomInt);
        }
        System.out.println(answer);
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.StringTokenizer;

public class C {

	static boolean in(char c, String x) {
		for (int i = 0; i < x.length(); i++)
			if (x.charAt(i) == c)
				return true;
		return false;
	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		StringBuilder ans = new StringBuilder();
		char[] c = "ROYGBIV".toCharArray();

		while (N > 3) {

			for (int i = 0; i < c.length && N > 3; i++) {
				if (ans.length() == 0 || ans.length() < 3 || !in(c[i], ans.substring(ans.length() - 3, ans.length()))) {
					ans.append(c[i]);
					N--;
				}
			}

		}
		int p = 1;
		while (N > 0) {
			for (int i = 0; i < c.length && N > 0; i++) {
				if (ans.length() == 0 || ans.length() < 3 || (!in(c[i], ans.substring(ans.length() - 3, ans.length()))
						&& !in(c[i], ans.substring(0, p)))) {
					ans.append(c[i]);
					N--;
					p++;
				}
			}

		}

		System.out.println(ans);
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] nextIntArray1(int n) throws IOException {
			int[] a = new int[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] nextIntArraySorted(int n) throws IOException {
			int[] a = nextIntArray(n);
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				int t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
			Arrays.sort(a);
			return a;
		}

		public long[] nextLongArray(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArray1(int n) throws IOException {
			long[] a = new long[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArraySorted(int n) throws IOException {
			long[] a = nextLongArray(n);
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				long t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
			Arrays.sort(a);
			return a;
		}
	}
}

import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author codeKNIGHT
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, Scanner in, PrintWriter out) {
        int n=in.nextInt(),i;
        String s="";
        while (n-7>=0)
        {
            s+="VIBGYOR";
            n-=7;
        }
        char a[]={'V','I','B','G','Y','O'};
        for(i=0;i<n;i++)
            s+=a[i];
        out.println(s);
	}
}

import java.util.Scanner;

public class ProblemB {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int eggCount = scanner.nextInt();

        if (eggCount >= 7 && eggCount <= 100) {
            StringBuilder builder = new StringBuilder();

            int remainder = eggCount % 4;
            int qoutient = eggCount / 4;

            for (int i = 0; i < qoutient; i++) {
                if(i == qoutient - 1 && remainder == 0){
                    builder.append("RBIV");
                } else {
                    builder.append("ROYG");
                }
            }

            if (remainder == 1) {
                builder.append("B");
            } else if (remainder == 2) {
                builder.append("BI");
            } else if (remainder == 3) {
                builder.append("BIV");
            }

            System.out.println(builder.toString());
        }
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        String s = "VIBGYOR";
        int j=0;
        for (int i = 0; i < t; i++) {
            if(j==7) j=4;
            System.out.print(s.charAt(j));
            j++;
        }
    }
}

import java.io.*;
import java.util.*;

public class Main {

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private final DataInputStream din;
        private final byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

    static long MOD = (long) (1e9 + 7);

    static long powerLL(long x, long n)
    {
        long result = 1;
        while (n > 0)
        {
            if (n % 2 == 1)
            {
                result = result * x % MOD;
            }
            n = n / 2;
            x = x * x % MOD;
        }
        return result;
    }

    static long powerStrings(String sa, String sb)
    {
        long a = 0, b = 0;

        for (int i = 0; i < sa.length(); i++)
        {
            a = (a * 10 + (sa.charAt(i) - '0')) %
                    MOD;
        }

        for (int i = 0; i < sb.length(); i++)
        {
            b = (b * 10 + (sb.charAt(i) - '0')) %
                    (MOD - 1);
        }

        return powerLL(a, b);
    }

    static long gcd(long a, long b)
    {
        if (a==0) return b;
        else return gcd(b%a,a);
    }

    static long lcm(long a, long b)
    {
        return (a*b)/gcd(a,b);
    }

    static int lower_bound(List<Integer> list, int k)
    {
        int s = 0;
        int e = list.size();

        while (s!=e)
        {
            int mid = (s+e)>>1;

            if (list.get(mid)<k) s = mid+1;
            else e = mid;
        }

        if (s == list.size()) return -1;
        return s;
    }

    static int upper_bound(List<Integer> list, int k)
    {
        int s = 0;
        int e = list.size();

        while (s!=e)
        {
            int mid = (s+e)>>1;

            if (list.get(mid)<=k) s = mid+1;
            else e = mid;
        }

        if (s == list.size()) return -1;
        return s;
    }

    static void addEdge(ArrayList<ArrayList<Integer>>graph, int edge1, int edge2)
    {
        graph.get(edge1).add(edge2);
        graph.get(edge2).add(edge1);
    }

    static class Pair<X,Y>
    {
        public final X first;
        public final Y second;

        Pair(X first, Y second)
        {
            this.first = first;
            this.second = second;
        }

        public static <X,Y> Pair <X,Y> of (X a, Y b)
        {
            return new Pair<>(a,b);
        }

        public String toString()
        {
            return "("+first+","+second+")";
        }
    }

    static class Comparee
    {
        static void compare(List<Pair<Integer, Integer>> pairs, int m)
        {
            Collections.sort(pairs, new Comparator<Pair<Integer, Integer>>() {
                @Override
                public int compare(Pair<Integer, Integer> p1, Pair<Integer, Integer> p2) {
                    return p1.second - p2.second;
                }
            });
        }
    }

    public static void main(String[] args) throws java.lang.Exception
    {
        try
        {
            //FastReader fr = new FastReader();
            Reader fr = new Reader();

            try(OutputStream out = new BufferedOutputStream(System.out))
            {
                int n = fr.nextInt();

                String s1 = "VIBGYOR";
                String s = "";

                int len = n/7;

                for (int i=1;i<=len;i++) s+=s1;

                len = n%7;
                int rem = n%7;

                if (len>4)
                for (int i=0;i<len;i++) s+=s1.charAt(i);
                else
                {
                    len+=2;

                    for (int i=len;i<len+rem;i++) s+=s1.charAt(i);
                }

                out.write((s).getBytes());

                out.flush();
            }

        }

        catch(Exception e){}
        finally{}
    }
}

//(()) () (()((()()()())))

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class B_70 {
    public static void main(String[] args) {
        try {
            BufferedReader input = new BufferedReader(new InputStreamReader(
                    System.in));
            String line = input.readLine();
            char[] colors = { 'R', 'O', 'Y', 'G', 'B', 'I', 'V' };
            int numEggs = Integer.parseInt(line);
            int dived7 = numEggs / 7;
            StringBuilder eggsColour = new StringBuilder();
            for (int i = 0; i < (dived7 * 7); i++) {
                eggsColour.append(colors[i % 7]);
            }

            int i = (7 - numEggs % 7);

            for (int j = 0; j < (numEggs - (dived7 * 7)); j++, i++) {
                eggsColour.append(colors[i % 7]);
            }
            System.out.println(eggsColour.toString());
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}

import java.util.*;
import java.io.*;

public class EasterEggs {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		String colors = "ROYGBIV";
		int n = in.nextInt();
		int tail = n % 7;

		String ans = "";
		for (int i = 0; i < n - tail; ++i) {
			ans += colors.charAt(i % 7);
		}

		for (int i = 0; i < tail; ++i) {
			boolean[] seen = new boolean[7];
			int pos = ans.length();
			for (int j = 1; j <= 3; ++j) {
				seen[colors.indexOf(ans.charAt(pos - j))] = true;
			}

			for (int j = 0; j < 7; ++j) {
				if (!seen[j]) {
					ans += colors.charAt(j);
					break;
				}
			}
		}

		System.out.println(ans);

		in.close();
		System.exit(0);
	}
}

import java.io.*;
import java.util.*;

public class Task implements Runnable {
    FastReader in;
    PrintWriter out;

    public void solve() throws IOException {
        final String color = new String("ROYGBIV");
        int n = in.nextInt();
        out.print(color);
        n -= 7;
        for (int i = 0; i < n / 4; ++i) {
            out.print(color.substring(0, 4));
        }
        out.println(color.substring(4, 4 + n % 4));
    }

    public void run() {
        try {
            in = new FastReader();
            out = new PrintWriter(System.out);
            solve();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    public static void main(String[] args) throws IOException {
        new Task().run();
    }
}

class FastReader {
    BufferedReader br;
    StringTokenizer in;

    FastReader() {
        this.br = new BufferedReader(new InputStreamReader(System.in));
    }

    FastReader(String filename) {
        try {
            this.br = new BufferedReader(new FileReader(filename));
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    public String nextToken() throws IOException {
        while (in == null || !in.hasMoreTokens()) {
            in = new StringTokenizer(br.readLine());
        }
        return in.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
}

import java.util.*;

public class cf78b {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);
        String d = "ROYGBIV";
        char[] a = "OYGBIV".toCharArray();
        StringBuilder f = new StringBuilder();
        int n = input.nextInt();
        int q = n / 7;
        for (int i = 0; i < q; i++) {

            f.append(d);

        }

        n = n - (q * 7);

        for (int i = 0; i < n; i++) {
            f.append(a[i]);
        }

        System.out.println(f);

    }

}

import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out, true);
        Scanner in = new Scanner(System.in);
        Main solver = new Main(in, out);
        solver.run();
        in.close();
        out.close();
        return;
    }

    Scanner in;
    PrintWriter out;

    public Main(Scanner i, PrintWriter o) {
        in = i;
        out = o;
    }

    String s = new String("ROYGBIV");

    public void run() {
        int n = in.nextInt();
        char[] color = s.toCharArray();
        int k = n / 7;
        int i;
        StringBuilder sb = new StringBuilder();
        for (i = 0; i < k; i++) sb.append(s);
        int r = n % 7;
        if (r <= 4) {
            for (i = 4; i < 4+r; i++) sb.append(color[i]);
        }
        else if (r == 5) {
            sb.append(color[4]);
            for (i = 1; i <= 4; i++) sb.append(color[i]);
        }
        else { // r = 6;
            sb.append(color[4]);
            sb.append(color[5]);
            for (i = 1; i <= 4; i++) sb.append(color[i]);
        }
        out.println(sb.toString());
        return;
    }

}

import java.util.*;
public class JavaApplicationM{
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int n=in.nextInt(),j=0;
//----------------------------------------------
String s[]={"R","O","Y","G","R","B","I","V"};

for(int i=0;i<n;i++)
{
 System.out.print(s[j]);
 j++;
 if(j==8)j=0;
}

}}

import java.util.InputMismatchException;
import java.io.*;

/**
 * Generated by Contest helper plug-in
 * Actual solution is at the bottom
 */
public class Main {
    public static void main(String[] args) {
        InputReader in = new StreamInputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        run(in, out);
    }

    public static void run(InputReader in, PrintWriter out) {
        Solver solver = new edges();
        solver.solve(1, in, out);
        Exit.exit(in, out);
    }
}

class StreamInputReader extends InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar, numChars;

    public StreamInputReader(InputStream stream) {
        this.stream = stream;
        curChar = 0;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    @Override
    public void close() {
        try {
            stream.close();
        } catch (IOException ignored) {
        }
    }
}

abstract class InputReader {
    private boolean finished = false;

    public abstract int read();

    public int nextInt() {
        return Integer.parseInt(nextToken());
    }
    public String readString() {
        return readLine();
    }

    public String readLine() {
        StringBuffer res = new StringBuffer();
        do {
            int c = read();
            if (isEndOfLineChar(c)) {
                return res.toString();
            }
            res.appendCodePoint(c);
        }  while (true) ;
    }
    public String nextToken() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }
    private boolean isEndOfLineChar(int c) {
        return c == '\n' || c == '\r' || c == -1;
    }
    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public void setFinished(boolean finished) {
        this.finished = finished;
    }

    public abstract void close();
}

interface Solver {
    public void solve(int testNumber, InputReader in, PrintWriter out);
}

class Exit {
    private Exit() {
    }

    public static void exit(InputReader in, PrintWriter out) {
        in.setFinished(true);
        in.close();
        out.close();
    }
}

class edges implements Solver {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        String tmp = "ROYGBIV";
        int ans[] = new int[n];
        for (int i = 0; i < n; ++i) {
            boolean used[] = new boolean[7];
            for (int j = 0; j < 3; ++j) {
                if (i - j - 1 >= 0) used[ans[i - j - 1]] = true;
            }
            for (int j = 0; j < 3; ++j) {
                if (i + j + 1 >= n) {
                    int t = i + j + 1 - n;
                    used[ans[t]] = true;
                }
            }
            for (int j =0 ; j < 7; ++j) {
                if (!used[j]) {
                    ans[i] = j;
                    break;
                }
            }
        }
        for (int i = 0; i < n; ++i) {
            out.print(tmp.charAt(ans[i]));
        }
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String color = "ROYGBIV";
        String eggs = "";
        if (n <= 7) {
            eggs = color.substring(0, n);
        } else {
            eggs = color;
            for (int i = 7; i < n && (n-eggs.length() >= 4); i = i + 4) {
                eggs = eggs + color.substring(0, 4);
            }
        }
        if (eggs.length() < n) {
            eggs = eggs + color.substring(0, n - eggs.length());

        }
        System.out.println(eggs);

    }

}

// package com.company;
import java.io.*;
import java.util.*;
public class Main {

    public static void main(String[] args) throws Exception {
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 char[] ch ={'G','B','I','V','R','O','Y'};
	 int n = Integer.parseInt(br.readLine());
	 String s="ROYGBIV";
	 String ans="";
	 for(int i=0;i<n/7;i++)
     {
         ans+=s;
     }
	 for(int i=0;i<n%7;i++)
     {
         ans+=ch[i];
     }
	 System.out.println(ans);
    }
}

import java.util.Arrays;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Scanner;

public class Abc{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char chars[]={'R','O','Y','G','B','I','V'};
        int n=sc.nextInt();
        for (int i=0;i<n;i++){
            System.out.print(chars[i%7]);
        }
        System.out.println();
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in Actual solution is at the top
 *
 * @author Jatin Yadav
 */
public class Main {
  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    InputReader in = new InputReader(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    EasterEggs solver = new EasterEggs();
    solver.solve(1, in, out);
    out.close();
  }

  static class EasterEggs {
    InputReader in;
    PrintWriter out;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
      this.in = in;
      this.out = out;
      solve();
    }

    public void solve() {
      int n = ni();
      int times = n / 4;
      int rem = n % 4;
      String ans = "";
      for (int i = 0; i < times - (rem == 0 ? 1 : 0); i++) {
        ans += "ROYG";
      }
      if (rem == 0) {
        ans += "RBIV";
      } else {
        ans += "BIV".substring(0, rem);
      }
      out.println(ans);
    }

    private int ni() {
      return in.nextInt();
    }
  }

  static class InputReader {
    private final InputStream stream;
    private final byte[] buf = new byte[8192];
    private int curChar;
    private int snumChars;
    private InputReader.SpaceCharFilter filter;

    public InputReader(InputStream stream) {
      this.stream = stream;
    }

    public int snext() {
      if (snumChars == -1) {
        throw new InputMismatchException();
      }
      if (curChar >= snumChars) {
        curChar = 0;
        try {
          snumChars = stream.read(buf);
        } catch (IOException e) {
          throw new InputMismatchException();
        }
        if (snumChars <= 0) {
          return -1;
        }
      }
      return buf[curChar++];
    }

    public int nextInt() {
      int c = snext();
      while (isSpaceChar(c)) {
        c = snext();
      }
      int sgn = 1;
      if (c == '-') {
        sgn = -1;
        c = snext();
      }
      int res = 0;
      do {
        if (c < '0' || c > '9') {
          throw new InputMismatchException();
        }
        res *= 10;
        res += c - '0';
        c = snext();
      } while (!isSpaceChar(c));
      return res * sgn;
    }

    public boolean isSpaceChar(int c) {
      if (filter != null) {
        return filter.isSpaceChar(c);
      }
      return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public interface SpaceCharFilter {
      public boolean isSpaceChar(int ch);
    }
  }
}

import java.util.*;
public class Main
{

    public static void main(String args[])
    {
        Scanner sc=new Scanner(System.in);
        char c[]={'V','I','B','G','Y','O','R'};
        int n=sc.nextInt();
        int i=0;
        StringBuffer s=new StringBuffer();
        int j=0;
        for(i=0;i<n;i++)
        {
            j=j%7;
            s.insert(i,c[j]);
            j++;
        }
        System.out.println(s);
        String str=s.toString();
        if(str.charAt(n-1)=='V')
        {
            s.setCharAt(n-1,'G');
        }
        else if(str.charAt(n-1)=='I')
        {
            s.setCharAt(n-1,'Y');
            s.setCharAt(n-2,'G');
        }
        else if(str.charAt(n-1)=='B')
        {
            s.setCharAt(n-1,'O');
            s.setCharAt(n-2,'Y');
            s.setCharAt(n-3,'G');
        }
        System.out.println(s);

    }
}

import java.util.*;

public final class Solution
{
	public static void main(String[] args)
	{
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		String result = "";
		while( n - 7 >= 0)
		{
			result = result + "ROYGBIV";
			n -= 7;
		}
		if(n != 1)
		{
			char[] colors = {'R','O','Y','G','B','I','V'};
			for(int i = 0 ; i < n ; i++)
				result += colors[i];
		}
		else
		{
			result += "O";
		}
		System.out.println(result);
		input.close();
	}
}

import java.io.*;
import java.util.*;
public class C {

    public static void main(String[] args) {
        InputReader sc = new InputReader(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        Random gen = new Random();
        int test = 1;//sc.nextInt();
        while(test-- > 0)
        {
            String c = "ROYGBIVYORBGI";
            int n = sc.nextInt();

            int x = n/13;
            int rem = n%13;
            StringBuffer sb = new StringBuffer();
            sb.append(c.repeat(x)).append(c.substring(0,rem));
            pw.println(sb);

        }
        pw.close();
    }

    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;

        public InputReader(InputStream st) {
            this.stream = st;
        }

        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public static int[] shuffle(int[] a, Random gen)
        { for(int i = 0, n = a.length;i < n;i++)
        { int ind = gen.nextInt(n-i)+i;
            int d = a[i];
            a[i] = a[ind];
            a[ind] = d;

        }
            return a;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

    }

}

import java.util.ArrayList;
import java.util.Scanner;

public class main {

	public static void main(String[] args) {

		 Scanner sc = new Scanner(System.in);
		   ArrayList<String> colors = new ArrayList<String>();

		   colors.add("R");
		   colors.add("O");
		   colors.add("Y");
		   colors.add("G");
		   colors.add("B");
		   colors.add("I");
		   colors.add("V");

		   int c = sc.nextInt();

		   ArrayList<String> color = new ArrayList<String>();

		   String colorss="" ;
		   int counter = 0;
		   for (int i =0; i<c; i++){
			   if(color.size() == 0) {
				   color.addAll(colors);
				   counter = 0;
			   }

			   if(i == c-1 && counter == 0)
			   {
				   colorss += color.get(1);
				   color.remove(1);
				   break;
			   }

			   colorss += color.get(0);
			   color.remove(0);
			   counter++;

		   }

		   System.out.print(colorss);
	}

}

import java.util.Scanner;

public class ProblemB {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int eggCount = scanner.nextInt();

        StringBuilder builder = new StringBuilder();

        if (eggCount >= 7 && eggCount <= 100) {
            for (int c = 0; c < eggCount; c++) {
                if (c % 7 == 0) {
                    builder.append("R");
                } else if (c % 7 == 1) {
                    builder.append("O");
                } else if (c % 7 == 2) {
                    builder.append("Y");
                } else if (c % 7 == 3) {
                    builder.append("G");
                } else if (c % 7 == 4) {
                    builder.append("B");
                } else if (c % 7 == 5) {
                    builder.append("I");
                } else if (c % 7 == 6) {
                    builder.append("V");
                }
            }

            int lastIndex = builder.length() - 1;
            char first = builder.charAt(0);
            char last = builder.charAt(lastIndex);
            char c = 0;

            String op = "";

            if (first == last) {
                if (first == 'R') {
                    c = 'O';
                } else if (first == 'O') {
                    c = 'Y';
                } else if (first == 'Y') {
                    c = 'G';
                } else if (first == 'G') {
                    c = 'B';
                } else if (first == 'B') {
                    c = 'I';
                } else if (first == 'I') {
                    c = 'V';
                } else if (first == 'V') {
                    c = 'R';
                }

                op = replaceCharAt(builder.toString(), lastIndex, c);
                System.out.println(op);
            } else {
                System.out.println(builder.toString());
            }
        }
    }

    public static String replaceCharAt(String s, int pos, char c) {
        return s.substring(0, pos) + c + s.substring(pos + 1);
    }
}

import java.util.Scanner;
public class Main
{

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int size = sc.nextInt();
        String output = "ROYGBIV";

        System.out.print(output);

            for(int j=8;j<=size;j++)
            {
                if(j%7 == 1 || j%7 == 5)
                    System.out.print(output.charAt(3));
                else if(j%7 == 2 || j%7 == 6)
                    System.out.print(output.charAt(4));
                else if (j%7 == 3)
                    System.out.print(output.charAt(5));
                else if(j%7 == 4)
                    System.out.print(output.charAt(6));

            }

        System.out.println();
    }

}

import java.util.Scanner;

public class Codeforces {

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String color = "ROYGBIV";
		System.out.print(color);
		int k =3;
		for(int i=7;i<=n;i++)
		{
			if(n>=8)
			{
				if(k%7 ==0)
				{
					k=3;
				}
				else
					System.out.print(color.charAt(k++));
			}
		}
	}
}

/*

 ////  /////    /// ////// //  //  ////  //     /// //  // /////  //  // //////
 /  // //      ////   /    //  //  // // //    //// //  // //     //  //   /
 /  // ////   /////   /    //////  // // //   ///// //  // // /// //////   /
 /  // //    //  //   /    //  //  // // //  //  // //  // //  // //  //   /
 ////  //// //   //   /    //  //  //  //// //   // ////// ////// //  //   /

*/

import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.StringTokenizer;

/*
* Problem : 78 B
* Acknowledgement : None
* Author : deathnaught_
* GitHub : www.github.com/DeathNaughT-GitHub
* Complexity : O(N)
*/

public class B78
{
    static class MyDS
    {
        ArrayList<Integer> arr;
        HashMap<Integer, Integer>  hash;

        public MyDS()
        {
            arr = new ArrayList<Integer>();
            hash = new HashMap<Integer, Integer>();
        }

        void add(int x)
        {
            if (hash.get(x) != null)
            return;

            int s = arr.size();
            arr.add(x);
        hash.put(x, s);
        }

        void remove(int x)
        {
            Integer index = hash.get(x);
            if (index == null)
            return;
            hash.remove(x);
            int size = arr.size();
            Integer last = arr.get(size-1);
            Collections.swap(arr, index,  size-1);
            arr.remove(size-1);
            hash.put(last, index);
        }

        Integer search(int x)
        {
            return hash.get(x);
        }
    }

    static class FastReader
    {

        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

		boolean hasNext()
		{
		    return st == null ? false : true;
		}

        char nextChar()
        {
            return next().charAt(0);
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        BigInteger nextBigInteger()
        {
            return (new BigInteger(next()));
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }

        int[] nextArray(int rows)
        {
            int arr[] = new int[rows];
            for (int i = 0; i < rows; i++)
            arr[i] = nextInt();
            return arr;
        }

        long[] nextLongArray(int rows)
        {
            long arr[] = new long[rows];
            for (int i = 0; i < rows; i++)
            arr[i] = nextLong();
            return arr;
        }

        char[] nextCharArray(int rows)
        {
            char arr[] = new char[rows];
            for (int i = 0; i < rows; i++)
            arr[i] = next().charAt(0);
            return arr;
        }

        int[][] nextMatrix(int rows, int columns)
        {
            int mat[][] = new int[rows][columns];
            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < columns; j++)
                {
                    mat[i][j] = nextInt();
                }
            }
            return mat;
        }
    }

    public static void main(String[] args)
    {

        FastReader sc = new FastReader();

        int N = sc.nextInt();
        String s = "VIBGYOR";
        if (N <= 7)
        System.out.println(s.substring(0, N));
        else
        {
            s = "GYOR";
            String w = s;
            int pos = 0;
            int k = N - 7;
            while (k > 0)
            {
                w = w + s.charAt(pos);
                pos = (pos + 1) % 4;
                k--;
            }

            System.out.println(w);

        }
    }

}

/*

                                                               __..-'
                                                         _.--''
                                               _...__..-'
                                             .'
                                           .'
                                         .'
                                       .'
            .------._                 ;
      .-"""`-.<')    `-._           .'
     (.--. _   `._       `'---.__.-'
      `   `;'-.-'         '-    ._
        .--'``  '._      - '   .
         `""'-.    `---'    ,
 ''--..__      `\
         ``''---'`\      .'
                   `'. '
                     `'.
                                                        @deathnaught_
*/

import java.util.Scanner;

public class EasterEggs {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		String a = "ROYGBIV";
		for(int i=0;i<100;i++)
			if(i%2==0)
				a += "ROYGBIV";
			else
				a += "VIBGYOW";

		System.out.println(a.substring(0, n));
	}

}

import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Collection;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class CF70B implements Runnable{

    public static void main(String args[]){
       new CF70B().run();
    }

    @Override
    public void run(){
        try{
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            tok = null;
            solve();
            in.close();
            out.close();

        }
        catch(IOException e){
            e.printStackTrace();
            System.exit(0);
        }
    }

    int nextInt()throws IOException{
        return Integer.parseInt(nextToken());
    }

    double nextDouble()throws IOException{
        return Double.parseDouble(nextToken());
    }

    long nextLong() throws IOException{
        return Long.parseLong(nextToken());
    }

    String nextToken()throws IOException{
        while(tok == null || !tok.hasMoreTokens()){
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;
    //////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////
    private void solve()throws IOException{
      String s = "ROYGBIV";

      StringBuilder sb = new StringBuilder();
      int n = nextInt();
      for(int i = 0; i< n - 1; i++){
          sb.append(s.charAt(i % 7));
      }

      String now = sb.substring(0, 3) + sb.substring(sb.length() - 3,sb.length());

      for(int i = 0; i < s.length(); i++){
          if(now.indexOf(s.charAt(i)) < 0){
              sb.append(s.charAt(i));
              break;
          }
      }
      out.println(sb.toString());
    }
}

/* IMPORTANT: Multiple classes and nested static classes are supported */

/*
 * uncomment this if you want to read input.
//imports for BufferedReader
import java.io.BufferedReader;
import java.io.InputStreamReader;

//import for Scanner and other utility classes
import java.util.*;
*/

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
import java.util.*;
public class TestClass {
    public static void main(String args[] ) throws Exception {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        String s="";
        String ans="ROYGBIV";
        int m=t/7;
        int p=t%7;
        while(m-->0)
        {
           s+=ans;
        }
        s+=ans.substring(0,p);
        System.out.println(s);
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class problemA {
		public static void main (String args []) throws IOException
				{  Scanner sc=new Scanner (System.in);
				int x=sc.nextInt();
				String s="ROY";
				StringBuilder s2=new StringBuilder();
				char[] ch2= {'G','R','B','I','V'};
				x=x-3;
				for(int i=0;i<x;i++)
				{
					int j=i%4;
					s2=s2.append(ch2[j]);
				}
			    	System.out.print(s);
					System.out.print(s2);

				}

		static class Scanner
		{
			StringTokenizer st;
			BufferedReader br;

			public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

			public String next() throws IOException
			{
				while (st == null || !st.hasMoreTokens())
					st = new StringTokenizer(br.readLine());
				return st.nextToken();
			}

			public int nextInt() throws IOException {return Integer.parseInt(next());}

			public long nextLong() throws IOException {return Long.parseLong(next());}

			public String nextLine() throws IOException {return br.readLine();}

			public double nextDouble() throws IOException
			{
				String x = next();
				StringBuilder sb = new StringBuilder("0");
				double res = 0, f = 1;
				boolean dec = false, neg = false;
				int start = 0;
				if(x.charAt(0) == '-')
				{
					neg = true;
					start++;
				}
				for(int i = start; i < x.length(); i++)
					if(x.charAt(i) == '.')
					{
						res = Long.parseLong(sb.toString());
						sb = new StringBuilder("0");
						dec = true;
					}
					else
					{
						sb.append(x.charAt(i));
						if(dec)
							f *= 10;
					}
				res += Long.parseLong(sb.toString()) / f;
				return res * (neg?-1:1);
			}

			public boolean ready() throws IOException {return br.ready();}

		}

				}

import java.util.*;
public class JavaApplicationM{
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int n=in.nextInt(),j=0;
//----------------------------------------------
String s[]={"R","O","Y","G","R","B","I","V"};

for(int i=0;i<n;i++)
{
 System.out.print(s[i%8]);
}
}}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aeroui
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();

            String s = "ROYGBIV";
            while (n > 7) {
                out.print(s);
                n -= 7;
            }

            int cur = 0;
            if (n % 7 == 0) {
                cur = 1;
            }

            while (n-- > 0) {
                out.print(s.charAt(cur++));
            }
        }

    }
}

import java.util.Scanner;

public class Solution {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();

        String[] arr = {"R", "O", "Y", "G", "B", "I", "V"};

        for (int i = 0; i < n; i = i) {

            for (int j = 0; j < 7 && i < n; j++) {
                System.out.print(arr[j]);
                i++;

            }

        }

    }

}

import java.util.Scanner;

public class CF78_D2_B_EasterEggs {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] c = "ROYGBIV".toCharArray();
        int n = sc.nextInt();
        char[] res = new char[n];
        for (int i = 0; i < n-3; i++) {
            res[i]=c[i%4];
        }
        for (int i = n-3; i < n; i++) {
            res[i]=c[i%4+3];
        }
        System.out.println(res);
    }

}

import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Mountain {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int n = in.nextInt();

        char[] a = {'R', 'O', 'Y', 'G', 'B', 'I', 'V'};
        char[] out = new char[n];

        for (int i = 0; i < n; i++) {
            out[i] = a[i % 7];

        }

        if (n > 8) {
            boolean f = false;
            for (int i = 0; i < 7; i++) {
                if (a[i] != 'R' && a[i] != 'O' && a[i] != out[n - 3] && a[i] != out[n - 4] && f == false) {

                    out[n - 2] = a[i];
                    f = true;
                    i++;
                }

                if (a[i] != 'R' && a[i] != 'O' && a[i] != out[n - 3] && a[i] != out[n - 4] && f == true) {

                    out[n - 1] = a[i];
                    break;
                }

            }

            String s = new String(out);

            System.out.println(s);
            return;
        } else if (n == 7) {
            String s = new String(out);

            System.out.println(s);
            return;

        } else if (n == 8) {

            out[n - 1] = 'G';

        String s = new String(out);

        System.out.println(s);
        return;

    }

    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.StringTokenizer;

public class C {

	static boolean in(char c, String x) {
		for (int i = 0; i < x.length(); i++)
			if (x.charAt(i) == c)
				return true;
		return false;
	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		StringBuilder ans = new StringBuilder();
		char[] c = "ROYGBIV".toCharArray();

		while (N > 3) {

			for (int i = 0; i < c.length && N > 3; i++) {
				if (ans.length() == 0 || ans.length() < 3 || !in(c[i], ans.substring(ans.length() - 3, ans.length()))) {
					ans.append(c[i]);
					N--;
				}
			}

		}

		int p = 1;
		while (N > 0) {
			for (int i = 0; i < c.length && N > 0; i++) {
				if (ans.length() == 0 || ans.length() < 3 || !in(c[i], ans.substring(ans.length() - 3, ans.length()))
						&& !in(c[i], ans.substring(0, Math.min(p, ans.length())))) {
					ans.append(c[i]);
					N--;
					p++;
				}
			}
		}

		System.out.println(ans);
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] nextIntArray1(int n) throws IOException {
			int[] a = new int[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] nextIntArraySorted(int n) throws IOException {
			int[] a = nextIntArray(n);
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				int t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
			Arrays.sort(a);
			return a;
		}

		public long[] nextLongArray(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArray1(int n) throws IOException {
			long[] a = new long[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArraySorted(int n) throws IOException {
			long[] a = nextLongArray(n);
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				long t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
			Arrays.sort(a);
			return a;
		}
	}
}

import java.util.*;
// warm-up
public class EasterEggs {

	static String colors = "ROYGBIV";

	static void solve() {
		Scanner sc = new Scanner(System.in);
		StringBuilder b = new StringBuilder();
		int n = sc.nextInt(), d = n/7, r = n%7;
		if (r>0 && r<4) {
			b=b.append(colors.substring(0,4)).append(colors.substring(0,r)).append(colors.substring(4));
		} else {
			b=b.append(colors.substring(0,r));
			while (d-->0) System.out.print(colors);
		}
		System.out.print(b);
		sc.close();
	}

	public static void main(String args[]) {
		solve();
	}

}

import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class Main {
	static PrintWriter out=new PrintWriter(System.out);

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String a="ROYGBIV";
		String ans="";
		int n=sc.nextInt();
		for(int i=0;i<n/7;i++)ans+=a;
		if(n%7==6)ans+=a.substring(0,7);
		if(n%7==5)ans+=a.substring(0,6);
		if(n%7==4)ans+=a.substring(0,5);
		if(n%7==3)ans+="OYG";
		if(n%7==2)ans+="YG";
		if(n%7==1)ans+="G";
		out.println(ans);
		out.close();
	}

	static class Pair implements Comparable<Pair>{
		int x;
		int y;
		public Pair(int x,int y) {
			this.x=x;
			this.y=y;
		}
		public int compareTo(Pair o) {
			return (this.x!=o.x)?this.x-o.x:this.y-o.y;
		}
		public String toString() {
			return "("+this.x+","+this.y+")";
		}

	}
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;
		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}
		public Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		}
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
		public String nextLine() throws IOException {
			return br.readLine();
		}
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
		public boolean ready() throws IOException {
			return br.ready();
		}
		public int[] nextIntArr(int n) throws IOException{
			int arr[]=new int[n];
			for(int i=0;i<n;i++)arr[i]=nextInt();
			return arr;
		}
		public BigInteger BigInteger(String s) throws IOException{
			BigInteger a=new BigInteger(s);
			return a;
		}
	}
}

import java.util.Scanner;
public class acm
{
public static void main(String[] args)
{

	Scanner in=new Scanner(System.in);
	int n =in.nextInt();
	int first[]=new int [30];
	int last[]=new int [30];
	String res="ROYGBIV";
	for(int i=0;i<7;i++){
		first[res.charAt(i)-'A']=i;last[res.charAt(i)-'A']=i;}
	for(int i=7;i<n;i++)
	{

	for(int j=0;j<7;j++)
	{

		int ix1=last[res.charAt(j)-'A'];
		int ix2=first[res.charAt(j)-'A'];
		boolean f =true ;
		if(i-ix1+1<=4)
			f=false;
		if((n-i)+(ix2+1)<=4)
			f=false;

		if(f)
		{

			last[res.charAt(j)-'A']=i;
			res+=res.charAt(j);

		}

	}

	}
	System.out.println(res);

}
}

import java.util.*;
public class Main2 {
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = A/7;
        String E = "";
        for (int i = 0; i<B;i++){
            E = E + "ROYGBIV";
        }

        char Q = E.charAt(0);
        char W = E.charAt(1);
        char R = E.charAt(2);

        for (int i = 0; i<A-B*7-3; i++){
            if (E.charAt(E.length()-1) != 'R' && E.charAt(E.length()-2) != 'R' && E.charAt(E.length()-3) != 'R'){
                E = E + "R";
                continue;
            }
            if (E.charAt(E.length()-1) != 'O' && E.charAt(E.length()-2) != 'O' && E.charAt(E.length()-3) != 'O'){
                E = E + "O";
                continue;
            }
            if (E.charAt(E.length()-1) != 'Y' && E.charAt(E.length()-2) != 'Y' && E.charAt(E.length()-3) != 'Y'){
                E = E + "Y";
                continue;
            }
            if (E.charAt(E.length()-1) != 'G' && E.charAt(E.length()-2) != 'G' && E.charAt(E.length()-3) != 'G'){
                E = E + "G";
                continue;
            }
            if (E.charAt(E.length()-1) != 'B' && E.charAt(E.length()-2) != 'B' && E.charAt(E.length()-3) != 'B'){
                E = E + "B";
                continue;
            }
            if (E.charAt(E.length()-1) != 'I' && E.charAt(E.length()-2) != 'I' && E.charAt(E.length()-3) != 'I'){
                E = E + "I";
                continue;
            }
            if (E.charAt(E.length()-1) != 'V' && E.charAt(E.length()-2) != 'V' && E.charAt(E.length()-3) != 'V'){
                E = E + "V";
                continue;
            }
        }

        for (int i = 0; i<3; i++){
        if (E.charAt(E.length()-1) != 'R' && E.charAt(E.length()-2) != 'R' && E.charAt(E.length()-3) != 'R' && E.charAt(0) != 'R' && E.charAt(1) != 'R' && E.charAt(2) != 'R'){
            E = E + "R";
            continue;
        }

        if (E.charAt(E.length()-1) != 'O' && E.charAt(E.length()-2) != 'O' && E.charAt(E.length()-3) != 'O' && E.charAt(0) != 'O' && E.charAt(1) != 'O' && E.charAt(2) != 'O'){
            E = E + "O";
            continue;
        }
        if (E.charAt(E.length()-1) != 'Y' && E.charAt(E.length()-2) != 'Y' && E.charAt(E.length()-3) != 'Y' && E.charAt(0) != 'Y' && E.charAt(1) != 'Y' && E.charAt(2) != 'Y'){
            E = E + "Y";
            continue;
        }
        if (E.charAt(E.length()-1) != 'G' && E.charAt(E.length()-2) != 'G' && E.charAt(E.length()-3) != 'G' && E.charAt(0) != 'G' && E.charAt(1) != 'G' && E.charAt(2) != 'G'){
            E = E + "G";
            continue;
        }
        if (E.charAt(E.length()-1) != 'B' && E.charAt(E.length()-2) != 'B' && E.charAt(E.length()-3) != 'B' && E.charAt(0) != 'B' && E.charAt(1) != 'B' && E.charAt(2) != 'B'){
            E = E + "B";
            continue;
        }
        if (E.charAt(E.length()-1) != 'I' && E.charAt(E.length()-2) != 'I' && E.charAt(E.length()-3) != 'I' && E.charAt(0) != 'I' && E.charAt(1) != 'I' && E.charAt(2) != 'I'){
            E = E + "I";
            continue;
        }
        if (E.charAt(E.length()-1) != 'V' && E.charAt(E.length()-2) != 'V' && E.charAt(E.length()-3) != 'V' && E.charAt(0) != 'V' && E.charAt(1) != 'V' && E.charAt(2) != 'V'){
            E = E + "V";
            continue;
        }
        }
        System.out.println(E);
    }
}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {
   public static void main(String[] args) {
      Scanner scan = new Scanner(System.in); // use the Scanner class to read from stdin
      String inputString = scan.nextLine(); // read a line of input and save it to a variable
      scan.close(); // close the scanner

      int n = Integer.parseInt(inputString);
      String colors = "ROYGBIV";
      String rcolors = "GBIVROY";
      String result = "";

      for (int a=0; a<n/7; a++)
      {
          result = result + colors;
      }
      int r = n % 7;

      for (int a=0; a<r; a++)
      {
          result = result + rcolors.charAt(a);
      }
      // Your first line of output goes here
      System.out.println(result);

      // Write the second line of output
   }
}