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.

Input

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

Output

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.

Examples

Input

8


Output

ROYGRBIV


Input

13


Output

ROYGBIVGBIVYG

Note

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

<image>

Difficulty: EASY
Tags: Implementation

Constructive algorithms

Starter code:

Solutions:
n = int(input())
s = 'ROYGBIV'
s1 = 'GBIV'
print(s, (n - 7) // 4 * s1, s1[:(n - 7) % 4], sep='')


from sys import stdin, stdout
ipt = input()
n = int(ipt.split()[0])
colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
res = ''
c = 0
for i in range(0, n):
	res += colors[c]
	c += 1
	if c == 7:
		c = 3
print(res)


n = int(input())
s = 'ROYBGIV'
s2 = 'BGIV'
k = 0
n1 = n // 7
s1 = s * n1
n2 = n - 7 * n1
for i in range(0, n2):
	s1 = s1 + s2[k]
	k = k + 1
	if k == 4:
		k = 0
print(s1)


t = int(input())
str1 = 'VIBGYOR'
if t == 7:
	print('VIBGYOR')
else:
	j = 0
	for i in range(8, t + 1):
		if j == 0:
			str1 = str1[0:] + 'G'
			j += 1
			continue
		if j == 1:
			str1 = str1[0:] + 'Y'
			j += 1
			continue
		if j == 2:
			str1 = str1[0:] + 'O'
			j += 1
			continue
		if j == 3:
			str1 = str1[0:] + 'R'
			j = 0
			continue
	print(str1)


str = 'ROYGBIV'
str2 = 'GBIVROY'
n = int(input())
final = str * (n // 7)
if n % 7 >= 4:
	final += str[:n % 7]
else:
	final += str2[:n % 7]
print(final)


n = int(input())
c = 'ROYGBIV'
ans = ''
for i in range(n):
	ans += c[i % 7]
if ans[-2] == 'O':
	ans = ans[:-3] + 'GBI'
elif ans[-1] == 'R':
	ans = ans[:-1] + 'G'
elif ans[-2:] == 'RO':
	ans = ans[:-2] + 'GB'
print(ans)


n = int(input())
s = 'ROYGBIV'
a = int((n - n % 7) / 7)
b = ''
for i in range(0, a):
	b += s
a = int(n % 7)
if a > 3:
	b += s[0:a]
else:
	b += s[3:3 + a]
print(b)


n = int(input())
m = 'ROYG'
v = m * ((n - 3) // 4)
print(m * ((n - 3) // 4) + m[0:n - (len(v) + 3)] + 'BIV')


n = int(input())
res = 'ROYGBIV'
for i in range(7, n):
	res += res[len(res) - 4]
print(res)


x = int(input())
list = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
i = 0
n = x
while n > 0:
	print(list[i], end='')
	i += 1
	if i == 7:
		if x - 7 >= 4:
			i = 0
		elif x - 7 == 3:
			i = 1
		elif x - 7 == 2:
			i = 2
		elif x - 7 == 1:
			i = 3
		elif x - 7 == 0:
			i = 4
		x -= 7
	n -= 1


import sys, math, string
input = sys.stdin.readline
from collections import deque
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
n = int(input())
p = 'ROYGBIV'
n -= 7
for i in range(n):
	p += p[-4]
print(p)


import sys
n = int(sys.stdin.readline())
colors = 'ROYGBIV'
circle = colors[:4] * (n // 4)
m = n - len(circle)
circle += colors[4:]
circle = circle[3 - m:]
print(circle)


(n, ans, extra) = (int(input()), 'ROYGBIV', 'GBIV')
rem = n - 7
print(ans + rem // 4 * extra + extra[:rem % 4])


def single_integer():
	return int(input())

def multi_integer():
	return map(int, input().split())

def string():
	return input()

def multi_string():
	return input().split()
n = single_integer()
colors = 'ROYGBIV'
c_list = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
print(colors * (n // 7) + c_list[n % 7])


palette = 'ROYGBIV'
rep = 'GBIV'
colors = palette + rep * 100
n = int(input())
s = colors[:n]
print(s)


n = int(input())
n -= 3
print('ROY', end='')
s = 'GBIV'
i = 0
while n:
	i %= 4
	print(s[i], end='')
	i += 1
	n -= 1
print()


import sys
from array import array

def input():
	return sys.stdin.buffer.readline().decode('utf-8')
s = 'ROY' + 'GBIV' * 100
print(s[:int(input())])


n = int(input())
s = 'ROYGBIV'
x = 'GBIVGB'
res = s * (n // 7) + x[:n % 7]
print(res)


n = int(input())
from sys import stdout
stdout.write('VIBGYOR')
n -= 7
while n > 4:
	stdout.write('GYOR')
	n -= 4
stdout.write('GYOR'[:n])


print('BIV' + ''.join(('ROYG'[i % 4] for i in range(int(input()) - 3))))


arr = 'ROYGBIV'
arr = list(arr)
n = int(input())
gap = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
ans = arr * (n // 7) + list(gap[n % 7])
print(*ans, sep='')


n = int(input())
arr = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
s = 'ROYGBIV'
ans = ''
x = n // 7
ans += s * x
ans += arr[n % 7]
print(ans)


n = int(input())
word = 'ROYGBIV'
ans = word * (n // 7)
r = n % 7
if r == 0:
	print(ans)
elif r == 1:
	print(ans + 'G')
elif r == 2:
	print(ans + 'GB')
elif r == 3:
	print(ans + 'YGB')
elif r == 4:
	print(ans + 'YGBI')
elif r == 5:
	print(ans + 'OYGBI')
else:
	print(ans + 'OYGBIV')


__author__ = 'artyom'

def main():
	n = read()
	s = 'ROYGBIV'
	return s * (n // 7) + 'GBIVGB'[:n % 7]

def read(mode=1, size=None):
	if mode == 0:
		return input().strip()
	if mode == 1:
		return int(input().strip())
	if mode == 2:
		return input().strip().split()
	if mode == 3:
		return list(map(int, input().strip().split()))
	a = []
	for _ in range(size):
		a.append(read(3))
	return a

def write(s='\n'):
	if s is None:
		s = ''
	if isinstance(s, tuple) or isinstance(s, list):
		s = ' '.join(map(str, s))
	s = str(s)
	print(s)
write(main())


n = int(input())
s = 'ROYGBIV'
count = 0
for x in range(n // 7):
	print(s, end='')
temp = 'GBIVGBIV'
if n % 7 != 0:
	ss = n - n // 7 * 7
	for x in range(ss):
		print(temp[count], end='')
		count = (count + 1) % 7


z = int(input())
x = list('ROYGBIV') * z
ans = ''
for i in range(z):
	ans += x[i]
if ans[-1] == 'R':
	ans = list(ans)
	ans.reverse()
	ans = ''.join(ans)
	ans = ans.replace('R', 'G', 1)
elif ans[-1] == 'O':
	ans = list(ans)
	ans.reverse()
	ans = ''.join(ans)
	ans = ans.replace('R', 'G', 1)
	ans = ans.replace('O', 'B', 1)
elif ans[-1] == 'Y':
	ans = list(ans)
	ans.reverse()
	ans = ''.join(ans)
	ans = ans.replace('R', 'G', 1)
	ans = ans.replace('O', 'B', 1)
	ans = ans.replace('Y', 'I', 1)
print(ans)


n = int(input())
s = 'ROYGBIV'
t = 'GBIV'
if n == 7:
	print(s)
else:
	print(s, end='')
	q = (n - 7) // 4
	r = (n - 7) % 4
	for i in range(q):
		print(t, end='')
	print(t[:r])


n = int(input())
s1 = 'ROYGBIV'
s = 'ROYGBIV'
s2 = 'GBIV'
x = n // 7
rem = n % 7
if x > 0:
	s = s * x
else:
	s = ''
if rem <= 3:
	for i in range(rem):
		s += s2[i]
else:
	for i in range(rem):
		s += s1[i]
print(s)


__author__ = 'dougct'

def main():
	n = int(input())
	colors = ['', 'G', 'YG', 'OYG', 'ROYG', 'ROYGB', 'ROYGBI']
	print('ROYGBIV' * (n // 7) + colors[n % 7])
main()


n = int(input())
s = 'ROY'
while len(s) < n:
	s += 'GBIV'
print(s[:n])


n = int(input())
seq = 'ROYGBIV'
se = 'GBIV'
r = n % 7
i = n // 7
result = ''
for j in range(i):
	result += seq
if r > 3:
	result += seq[:r]
else:
	result += se[:r]
print(result)


t = int(input())
k = 'ROYG'
s = int((t - 3) / 4) * k
s = s + k[:(t - 3) % 4]
s = s + 'BIV'
print(s)


from collections import deque

class ColorStore:

	def __init__(self):
		self.colors = deque(['R', 'O', 'Y', 'G', 'B', 'I', 'V'])

	def get(self):
		color = self.colors.popleft()
		self.colors.append(color)
		return color

def solution(n):
	result = [None] * n
	_len = len(result)
	cs = ColorStore()
	for i in range(n):
		color = cs.get()
		_len_tail = len(result[i:])
		if _len_tail < 4:
			tail = result[i:] + result[0:4 - _len_tail]
			while color in tail:
				color = cs.get()
		result[i] = color
	return ''.join(result)
n = int(input())
print(solution(n))


from collections import defaultdict
hmap = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
n = int(input())
n = n - 7
rep = n // 4
rem = n - rep * 4
ans = 'ROYGBIV' + 'GBIV' * rep + ''.join([hmap[3 + i] for i in range(rem)])
print(ans)


import sys
import os

def get_int():
	return map(int, input().split())

def get_array():
	return list(map(int, input().split()))

def str_replacer(old_str, new_str, index):
	if index in range(len(old_str)):
		return old_str[:index] + new_str + old_str[index + 1:]
	else:
		return old_str
if os.environ.get('DEBUGSTER_PYTHON'):
	sys.stdin = open('in.txt', 'r')
	sys.stdout = open('out.txt', 'w')
s = 'VBIGYOR'
pat = 'GYOR'
while len(s) < 100:
	s += pat
n = int(input())
print(s[:n])


n = int(input())
tmp = 'VIBGYOR'
ans = [0] * n
(i, j, idx) = (0, n - 1, -1)
cnt = 0
while i <= j:
	idx = (idx + 1) % 7
	if cnt % 2 == 0:
		ans[i] = tmp[idx]
		i += 1
	else:
		ans[j] = tmp[idx]
		j -= 1
	cnt += 1
print(''.join(ans))


p = 'ROYGBIV'
n = int(input())
ap = n // 7
rem = n % 7
last = ['G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
p = p * ap
print(p + last[rem - 1] if rem >= 1 else p)


n = int(input())
ch = 'ROYGBIV'
res = ch * (n // 7)
if n % 7 == 1:
	res += 'G'
elif n % 7 == 2:
	res += 'GB'
elif n % 7 == 3:
	res += 'GBI'
elif n % 7 == 4:
	res += 'GBIV'
elif n % 7 == 5:
	res += 'RGBIV'
elif n % 7 == 6:
	res += 'ROGBIV'
print(res)


n = int(input())
t = 'ROYGBIV'
s = 'ROYGBIV'
for i in range(7, n):
	if i + 3 < n:
		s += t[i % 7]
	else:
		for x in range(7):
			if t[x] == s[i - 3] or t[x] == s[i - 2] or t[x] == s[i - 1] or (t[x] == s[0]) or (t[x] == s[1]) or (t[x] == s[2]):
				continue
			else:
				s += t[x]
				break
print(s)


n = int(input())
s2 = 'ROYGBIV'
r2 = 'ROYG'
for i in range(0, n - 7):
	r2 += r2[i % 4]
print(r2 + 'BIV')


n = int(input())
s = 'ROYGBIV'
se = 'GBIV'
c = n % len(s)
d = n // len(s)
f = int(c % 4)
if c == 0:
	print(s * d)
elif c <= 4:
	print(s * d + se[0:c])
elif f == 0:
	print(s * d + se * (c // 4))
else:
	print(s * d + se * (c // 4) + se[0:f])


import math
n = int(input())
base = 'ROYGBIV'
base_l = list(base)
for i in range(n // len(base) - 1):
	base_l.extend(list(base))
lp = 0
rp = len(base)
for i in range(len(base) - n % len(base)):
	if i % 2 == 0:
		lp += 1
	else:
		rp -= 1
base_l.extend(list(base)[lp:rp])
print(''.join(base_l))


n = int(input())
answer = ''
l = 'ROYGBIV'
answer = l * (n // 7)
q = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
t = n % 7
answer += q[t]
print(answer)


n = int(input())
color = 'ROYGBIV'
leftC = 'GBI'
mod = n % 7
if mod <= 2:
	left = leftC[:n % 7]
elif mod == 6:
	left = 'GBIVGB'
elif mod == 3:
	left = 'GBI'
elif mod == 4:
	left = 'GBIV'
elif mod == 5:
	left = 'GBIVG'
print(color * (n // 7) + left)


import sys
input = sys.stdin.readline
read_tuple = lambda _type: map(_type, input().split(' '))
from itertools import cycle

def solve():
	n = int(input())
	ans = [None for _ in range(n)]
	(ans[0], ans[1], ans[2], ans[3]) = ('R', 'O', 'Y', 'G')
	(ans[-1], ans[-2], ans[-3]) = ('B', 'I', 'V')
	colors = cycle(['R', 'O', 'Y', 'G'])
	for i in range(n):
		if ans[i] == None:
			ans[i] = next(colors)
	print(''.join(ans))
solve()


n = int(input())
colors = 'ROYGBIV'
res = ''
for i in range(n):
	res += colors[i % 7]
if len(res) > 7:
	for (idx, c) in enumerate(res[-3:], n - 3):
		cs = ''.join([x if x not in res[idx - 3:idx] + res[:3 - (n - idx) + 1] else '' for x in colors])
		if idx < 7:
			s = set(res[:idx])
			cs = [c for c in cs if c not in s]
		res = res[:idx] + cs[0]
print(res)


from sys import stdin, stdout
from itertools import permutations

def read_int_from_line():
	return list(map(int, input().split()))

def solve():
	n = int(input())
	color = list('ROYGBIV')
	remainder = n % 7
	for i in range(n // 7 * 7):
		ind = i % 7
		stdout.write(color[ind])
	if remainder == 0:
		print('')
		return
	if remainder > 3:
		for i in range(remainder):
			stdout.write(color[i])
		print('')
	else:
		for i in range(remainder):
			stdout.write(color[i + 3])
		print('')

def main():
	solve()
main()


N = int(input())
string = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
mod = ['G', 'B', 'I', 'V']
string = ''.join(string)
res = string * (N // 7)
remaining = N % 7
if remaining != 0:
	res += ''.join(mod) * (remaining // 4)
	remaining = remaining % 4
	if remaining != 0:
		res += ''.join(mod[:remaining])
print(res)


n = int(input())
k = n // 7
k1 = n % 7
s = 'VIBGYOR'
s = s * k
if k1 == 1:
	s += 'G'
elif k1 == 2:
	s += 'GY'
elif k1 == 3:
	s += 'IBG'
elif k1 == 4:
	s += 'IBGO'
elif k1 == 5:
	s += 'VIBGY'
elif k1 == 6:
	s += 'VIBGYO'
print(s)


n = int(input())
d1 = {1: 'G', 2: 'GB', 3: 'YGB', 4: 'YGBI', 5: 'OYGBI', 6: 'OYGBIV'}
x = n % 7
print(int(n / 7) * 'ROYGBIV', end='')
if x > 0:
	print(d1[x])


import math
n = int(input())
str = 'VIBGYOR'
remainder = (n - 7) % 4
if n == 7:
	print(str)
else:
	if remainder == 3:
		str += 'GYOR' * math.floor((n - 7) / 4) + 'GYO'
	elif remainder == 2:
		str += 'GYOR' * math.floor((n - 7) / 4) + 'GY'
	elif remainder == 1:
		str += 'GYOR' * math.floor((n - 7) / 4) + 'G'
	else:
		str += 'GYOR' * math.floor((n - 7) / 4)
	print(str)


n = int(input()) - 7
print('VIBGYOR' + 'GYOR' * (n // 4) + 'GYOR'[:n % 4])


main = int(input())
seven = ['R', 'O', 'YG', 'B', 'I', 'V']
rotate = ['G', 'B', 'I', 'V']
final = 'ROYGBIV'
j = 0
for i in range(main - len(final)):
	final += rotate[j]
	j += 1
	if j == 4:
		j = 0
print(final)


y = int(input())
y = y - 7
s = 'ROYGBIV'
sq = ['G', 'B', 'I', 'V']
i = 0
while y > 0:
	if i == 4:
		i = 0
	s += sq[i]
	i += 1
	y -= 1
print(s)


n = int(input())
output = []
colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
temp = 4
for x in range(n):
	if x < 7:
		output.append(colors[x])
	else:
		for i in colors:
			if i not in output[temp:temp + 4]:
				if i not in output[0:3]:
					output.append(i)
					temp += 1
					break
print(''.join(output))


from sys import stdin, stdout
n = int(stdin.readline())
output = 'ROYGBIV'
n -= 7
x = n % 4
if x == 0:
	output += 'GBIV' * (n // 4)
elif x == 1:
	output += 'GBIV' * (n // 4) + 'G'
elif x == 2:
	output += 'GBIV' * (n // 4) + 'GB'
else:
	output += 'GBIV' * (n // 4) + 'GBI'
print(output)


import sys
lines = sys.stdin.readlines()
n = int(lines[0].strip())
res = ''
for i in range((n - 3) // 4):
	res += 'ROYG'
res += 'ROYG'[:(n - 3) % 4]
res += 'BIV'
print(res)


n = int(input())
s = 'ROYGBIV'
m = n // 7
o = n % 7
k = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
for i in k:
	if len(i) == o:
		print(s * m + i)


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def main():
	n = inp()
	a = 'ROYGBIV'
	b = 'GBIV'
	res = a * (n // 7)
	baki = n % 7
	temp = int(ceil(baki / 4)) * b
	res += temp[:baki]
	print(res)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


print('VIBGYOR' + ''.join(['GYOR'[i % 4] for i in range(int(input()) - 7)]))


colors = 'ROYGBIV'
eggs = int(input())
print(colors, end='')
for i in range(eggs - 7):
	print(colors[i % 4 + 3], end='')
print()


n = int(input())
s = 'ROYGBIV'
(a, b) = divmod(n, len(s))
res = s * a
start = 3 if b <= 4 else 0
res += s[start:start + b]
print(res)


import sys

def main(n):
	can_use = 'ROYG'
	using = 0
	l = []
	for i in range(1, n + 1):
		if n - i <= 2:
			break
		l.append(can_use[using])
		using = (using + 1) % 4
	l.extend(['B', 'I', 'V'])
	print(''.join(l))
for (e, line) in enumerate(sys.stdin.readlines()):
	n = int(line.strip())
main(n)


n = int(input()) - 7
print('ROYGBIV' + 'GBIV' * (n // 4) + 'GBIV'[:n % 4])


n = int(input())
j = 0
x = 3
f = 0
s = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
for i in range(0, n):
	print(s[j], end='')
	j += 1
	if j == 7:
		j = 3


n = int(input())
c = 0
print('ROYGBIV', end='')
n -= 7
cr = ['G', 'B', 'I', 'V']
for i in range(n):
	print(cr[c], end='')
	c += 1
	if c == 4:
		c = 0
exit()
if (n - 1) % 7 == 0:
	for i in range(1, n + 1):
		if i % 8 == 0:
			print('G', end='')
			continue
		print(clr[c], end='')
		c += 1
		if c == 7:
			c = 0
else:
	for i in range(1, n + 1):
		if i % 8 == 0:
			print('G', end='')
			continue
		print(clr[c], end='')
		c += 1
		if c == 7:
			c = 0


n = int(input())
x = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
ans = ''
if n % 7 in [0, 6, 5, 4]:
	for i in range(n):
		ans += x[i % 7]
else:
	z = n // 7
	for i in range(z * 7):
		ans += x[i % 7]
	c = n % 7
	m = 'BIV'
	if c == 1:
		ans = ans[:-3] + 'R' + m
	elif c == 2:
		ans = ans[:-3] + 'RO' + m
	elif c == 3:
		ans = ans[:-3] + 'ROY' + m
print(ans)


n = int(input())
a = []
m = n // 7
s = n % 7
for i in range(0, m):
	a.append('ROYGBIV')
if s == 1:
	a.append('G')
elif s == 2:
	a.append('GB')
elif s == 3:
	a.append('YGB')
elif s == 4:
	a.append('YGBI')
elif s == 5:
	a.append('OYGBI')
elif s == 6:
	a.append('OYGBIV')
print(*a, sep='')


out = ''
cols = 'ROYGBIV'
n = int(input())
out += cols
n -= 7
out += cols[:4] * (n // 4)
if not n // 4:
	out += cols[3:3 + n]
else:
	n %= 4
	out += cols[4:4 + n]
print(out)


n = int(input())
colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
colors2 = ['G', 'B', 'I', 'V']
for i in colors:
	print(i, end='')
for i in range(n - 7):
	print(colors2[i % 4], end='')
print()


def main():
	s = 'ROYGBIV'
	n = int(input())
	n -= 7
	i = 3
	print(s, end='')
	while n > 0:
		n -= 1
		print(s[i], end='')
		i += 1
		if i >= 7:
			i = 3
	print()
main()


n = int(input())
color = ['R', 'O', 'Y', 'G', 'I', 'V', 'B']
s = [0 for i in range(n)]
for i in range(n // 2):
	s[i] = color[2 * i % 7]
	s[n - i - 1] = color[(2 * i + 1) % 7]
i += 1
if n % 2:
	s[n // 2] = color[2 * i % 7]
print(''.join(s))


from sys import stdin, stdout

def istr():
	return input()

def inum():
	return int(stdin.readline())

def imul():
	return map(int, stdin.readline().split())

def ilst():
	return list(map(int, stdin.readline().split()))

def splt():
	return list(stdin.readline().strip())

def emat(row):
	return [inum() for i in range(row)]
max_itr = 100
modd = 10 ** 9 + 7
from itertools import combinations
import math
n = inum()
first = 'ROYGBIV'
if n <= 7:
	print(first[0:n])
else:
	t = n // 7
	print(first[0:7] * t, end='')
	aa = n % 7
	l = ['NULL', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
	if aa > 0:
		print(l[aa])


n = int(input())
print(('ROYG' * ((n + 3) // 4))[:n - 3] + 'BIV')


n = int(input()) - 3
print('ROY', end='')
for i in range(int(n / 4)):
	print('GBIV', end='')
s = 'GBIV'
print(s[0:n % 4])


import math
n = int(input())
arr = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
str = 'ROYGBIV'
j = 0
for i in range(0, math.floor(n / 7)):
	print(str, end='')
n = n % 7
if n < 3 and n != 0:
	j = 3
	for i in range(0, n):
		print(arr[j], end='')
		j = j + 1
elif n >= 3 and n != 0:
	j = 1
	for i in range(0, n):
		print(arr[j], end='')
		j = j + 1


n = int(input())
colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
res = []
m = n // 7
mod = n % 7
for i in range(m):
	res.extend(colors)
if mod == 1:
	res.append('G')
elif mod == 2:
	res.extend(['G', 'B'])
elif mod == 3:
	res.extend(['Y', 'G', 'B'])
elif mod == 4:
	res.extend(['Y', 'G', 'B', 'I'])
elif mod == 5:
	res.extend(['O', 'Y', 'G', 'B', 'I'])
elif mod == 6:
	res.extend(['O', 'Y', 'G', 'B', 'I', 'V'])
string = ''
for char in res:
	string += char
print(string)


n = int(input())
st = 'ROYGBIV'
sub = 'GBIV'
x = 0
for i in range(n - 7):
	st += sub[x]
	x = (x + 1) % 4
print(st)


(n, colors) = (int(input()), 'ROYGBIV')
for i in range(n):
	print(colors[i if i < 7 else (i - 7) % 4 + 3], end='')


n = int(input())
arr = ['R', 'O', 'Y', 'G']
print('BIV', end='')
for i in range(n - 3):
	print(arr[i % 4], end='')


n = int(input())
t = 'ROYGBIV'
s = 'ROYG'
a = 'BIV'
temp1 = n % 7 % 4
temp2 = n % 7 // 4
temp3 = n // 7
print(t * (temp3 - 1) + s * (1 + temp2) + s[:temp1] + a)


n = int(input())
s = 'GBIV'
ans = 'ROYGBIV'
for i in range((n - 7) // 4):
	ans += s
for i in range((n - 7) % 4):
	ans += s[i]
print(ans)


n = int(input())
col = 'OYIV'
string = 'RGB'
n = n - 3
for i in range(n):
	string = string + col[i % 4]
print(string)


n = int(input())
s1 = 'ROYGBIV'
s = s1 * (n // 7)
if n % 7 != 0:
	if n % 7 > 4:
		s += s1[:n % 7]
	else:
		s += s1[3:n % 7 + 3]
print(s)


from sys import stdin, stdout
n = int(stdin.readline()) - 7
ans = 'ROYGBIV'
while n:
	ans += ans[-4]
	n -= 1
stdout.write(ans)


n = int(input())
res = [0] * n
v = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
res[:7] = ''.join(v)
for i in range(7, n):
	res[i] = res[i - 4]
print(''.join(res))


n = int(input())
colors = 'ROYGBIV'
lying = 'GBIVGBI'
out = ''
if n <= 7:
	out = colors[:n]
else:
	out = n // 7 * colors + lying[:n % 7]
print(out)


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))
n = ri()
colors = 'ROYGBIV'
ans = []
for i in range(n):
	ans.append(colors[i % 7])
if n % 7 == 1:
	ans[-1] = colors[3]
elif n % 7 == 2:
	ans[-1] = colors[3]
	ans[-2] = colors[2]
elif n % 7 == 3:
	ans[-1] = colors[3]
	ans[-2] = colors[2]
	ans[-3] = colors[1]
print(''.join(ans))


l = 'ROYGBIV'
n = int(input())
x = n // 7
k = n % 7
s = l * x
if k == 0:
	print(s)
elif k == 1:
	print(s + l[3])
elif k == 2:
	print(s + l[3] + l[4])
elif k == 3:
	print(s + l[3] + l[4] + l[5])
elif k == 4:
	print(s + l[3] + l[4] + l[5] + l[6])
elif k == 5:
	print(s + l[3] + l[4] + l[5] + l[6] + l[3])
elif k == 6:
	print(s + l[3] + l[4] + l[5] + l[6] + l[3] + l[4])


n = int(input())
s = 'ROYGBIV'
for _ in range(n - 7):
	s += s[-4]
print(s)


n = int(input())
colors_repeat = int(n / 7)
remain = n % 7
colors = 'ROYGBIV'
no_equal = 'GBIV'
if remain == 6:
	colors = colors * colors_repeat + 'RO' + no_equal
elif remain == 5:
	colors = colors * colors_repeat + 'R' + no_equal
else:
	colors = colors * colors_repeat + no_equal[:remain]
print(colors)


colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
n = int(input())
result = []
for i in range(n - 3):
	result += [colors[i % 4]]
result += colors[4:]
print(''.join(result))


n = int(input())
l = 'ROYGBIV'
at = 'GBIVGB'
final = ''
if n % 7 == 0:
	f = l * (n // 7)
else:
	f = l * (n // 7) + at[0:n % 7]
print(f)


n = int(input())
l = 'ROYGBIV'
q = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
print(l * (n // 7), q[n % 7], sep='')


rgb = 'ROYGBIV'
n = int(input())
out = ''
out += rgb * (n // 7)
n %= 7
out += rgb[3:] * (n // 4)
n %= 4
out += rgb[3:n + 3]
print(out)


n = int(input())
while n >= 7:
	n -= 7
	print('ROYGBIV', end='')
if n <= 3:
	print('GBI'[:n])
else:
	print('ROYGBIV'[:n])


n = int(input())
s = 'ROYGBIV'
for i in range(0, int(n / 7)):
	print(s, end='')
if n % 7 == 1:
	print('G')
elif n % 7 == 2:
	print('GB')
elif n % 7 == 3:
	print('YGB')
elif n % 7 == 4:
	print('YGBI')
elif n % 7 == 5:
	print('OYGBI')
elif n % 7 == 6:
	print('OYGBIV')


n = int(input())
colors = 'ROYGBIV'
ans = 'ROYGBIV'
for i in range(n - 7):
	for j in colors:
		if j not in ans[-3:] and j not in ans[:3]:
			ans += j
			break
print(ans)


n = int(input())
colors = 'ROYGBIV'
for i in range(n // 7):
	print(colors, end='')
print('GBIV'[:n % 7] if n % 7 < 5 else 'GBIVGB'[:n % 7], end='')


hat = int(input())
lst = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
new = ''
if hat == 7:
	print(''.join(lst))
elif hat == 8:
	print('ROYGRBIV')
elif hat == 9:
	print('ROYGROBIV')
elif hat == 10:
	print('ROYGROYBIV')
else:
	new += ''.join(lst) * int(hat / 7)
	x = 3
	for i in range(hat % 7):
		if x > 6:
			x = 3
		new += lst[x]
		x += 1
	print(new)


n = int(input())
colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
tab = []
i = 0
j = 0
while len(tab) != n:
	cl = colors[i % 7]
	if cl not in tab[j - 3:j] and cl not in tab[0:3]:
		tab.append(cl)
		j += 1
	i += 1
print(''.join(tab))


import sys
import string
from collections import Counter, defaultdict
from math import fsum, sqrt, gcd, ceil, factorial
from operator import *
from itertools import accumulate
inf = float('inf')
flush = lambda : sys.stdout.flush
comb = lambda x, y: factorial(x) // factorial(y) // factorial(x - y)
ip = lambda : input()
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())
n = ii()
a = n // 7
b = n % 7
s = 'VIBGYOR'
ans = list(s * a + '-' * b + s)
i = 7 * a
for j in range(i, i + b):
	x = list(s)
	for k in range(max(0, j - 3), j + 4):
		if ans[k] in x:
			x.remove(ans[k])
	ans[j] = x[0]
ans = ans[:-7]
print(''.join(ans))


n = int(input())
s = 'ROYGBIV'
m = n // 7
x = n % 7
c = ''
for i in range(m):
	c += s
if x >= 4:
	c += s[0:x]
elif x > 0:
	c += s[3:3 + x]
print(c)


n = int(input())
for _ in range(n // 7):
	print('ROYGBIV', end='')
print(['', 'G', 'GB', 'GBI', 'GBIV', 'RGBIV', 'ROGBIV', 'ROYGBIV'][n % 7])


count_eggs = int(input())
value = 1
name = 'ROYGBIV'
for i in range(6, count_eggs - 1):
	if value == 1:
		name = name + 'G'
		value += 1
	elif value == 2:
		name = name + 'B'
		value += 1
	elif value == 3:
		name = name + 'I'
		value += 1
	else:
		name = name + 'V'
		value = 1
print(name)


n = int(input())
colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
answer = list()
for i in range(n):
	answer.append(colors[i % 7])
if n % 7 < 4:
	elements = n % 7
	for i in range(elements):
		j = len(answer) - 1
		k = 3
		temp = answer[j]
		while k > 0:
			answer[j] = answer[j - 1]
			j -= 1
			k -= 1
		answer[j] = temp
printstring = ''
for i in range(len(answer)):
	printstring += answer[i]
print(printstring)


colours = 'ROYGBIV'
colour_pattern = ''
num_eggs = int(input())
if num_eggs >= 7:
	multiplier = int(num_eggs / 7)
	for x in range(0, multiplier):
		colour_pattern = colour_pattern + colours
	pos = multiplier * 7
	for idx in range(pos, num_eggs):
		for i in range(3, 7):
			if colour_pattern.find(colours[i], idx - 3, idx) == -1:
				if idx + 3 >= num_eggs:
					num_circ_pos = idx + 3 - num_eggs
					if colour_pattern.find(colours[i], 0, num_circ_pos) != -1:
						continue
				colour_pattern += colours[i]
				break
print(colour_pattern)


a = int(input())
b = 'VIBGYOR'
c = 'GBIV'
d = 0
for i in range(a):
	if i < 7:
		print(b[len(b) - 1 - i % 7], end='')
	else:
		print(c[d % 4], end='')
		d += 1


a = int(input())
s = 'ROYGBIV' * 14
s += 'ROY'
if s[a - 1] == 'R':
	ns = s[:a - 1]
	ns += 'G'
	print(ns)
elif s[a - 1] == 'O':
	ns = s[:a - 2]
	ns += 'GB'
	print(ns)
elif s[a - 1] == 'Y':
	ns = s[:a - 3]
	ns += 'GBI'
	print(ns)
else:
	print(s[:a])


import sys
import bisect
from collections import deque
RI = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
n = int(ri())
ans = [-1] * n
ans[n - 1] = 'I'
ans[n - 2] = 'V'
ans[n - 3] = 'O'
c = ['R', 'B', 'G', 'Y']
ite = 0
for i in range(n - 3):
	ans[i] = c[ite]
	ite = (ite + 1) % 4
print(''.join(ans))


n = int(input())
res = ''
times = n // 7
for _ in range(times):
	res += 'ROYGBIV'
arr = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
rem = n % 7
res += arr[rem]
print(res)


n = int(input())
counter = 0
answer = ''
whole = int(n / 7)
frac = n % 7
word = 'GBIV'
for i in range(whole):
	answer += 'ROYGBIV'
for i in range(frac):
	answer += word[i % 4]
print(answer)


s = ''
n = int(input())
for i in range(n - 3):
	s += 'ROYG'[i % 4]
print(s + 'BIV')


n = input()
c = 'ROYGBIV'
m = c * int(int(n) / 7)
i = int(int(n) % 7)
if i >= 4:
	m += c[:i]
elif i != 0:
	m += c[4 - i:4]
print(m)


n = int(input())
str = ''
str += 'VIBGYOR' * (n // 7)
if n % 7 == 1:
	str += 'G'
elif n % 7 == 2:
	str += 'BG'
elif n % 7 == 3:
	str += 'IBG'
elif n % 7 == 4:
	str += 'IBGY'
elif n % 7 == 5:
	str += 'IBGYO'
elif n % 7 == 6:
	str += 'VIBGYO'
print(str)


n = int(input())
s = 'VIBGYOR'
rem = n % 7
q = n // 7
s2 = ''
if n <= 7:
	print(s[:n])
else:
	if rem <= 4:
		s2 += q * s
		s2 += s[3:3 + rem]
	else:
		s2 += q * s
		s2 += s[:rem]
	print(s2)


a = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
n = int(input())
d = [0 for i in range(n)]
ret = ['A' for i in range(n)]

def ver(ret, n, i):
	j = 1
	while j < 4:
		if ret[(i + j) % n] == ret[i]:
			return False
		if ret[i - j] == ret[i]:
			return False
		j += 1
	if n - ret.count('A') <= 7 and ret.count(ret[i]) > 1:
		return False
	return True

def recucive(a, ret, n):
	i1 = 0
	while i1 < n and i1 >= 0:
		if d[i1] < 7:
			ret[i1] = a[d[i1]]
		if ver(ret, n, i1) and d[i1] < 7:
			i1 += 1
		else:
			d[i1] += 1
			if d[i1] >= 7:
				d[i1] == 0
				i1 -= 1
				d[i1] += 1
	return ret
ret = recucive(a, ret, n)
for i in ret:
	print(i, end='')
print()


n = int(input())
c = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
ans = c[:]
n -= 7
while n > 0:
	s = set(c[:])
	s.remove(ans[-1])
	s.remove(ans[-2])
	s.remove(ans[-3])
	s.remove('R')
	s.remove('O')
	s.remove('Y')
	ans.append(s.pop())
	n -= 1
print(''.join(ans))


s = 'ROYGBIV'
t = 'GBIV'
n = int(input()) - 7
print(s + n // 4 * t + t[:n % 4])


l = 'ROGYVBI'
s = 'YVBI'
n = int(input())
print(l, end='')
for i in range(n - 7):
	print(s[i % 4], end='')
print()


res = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
plus = ['G', 'B', 'I', 'V']
n = int(input())
needed = n % 7
print(*res * (n // 7), sep='', end='')
i = 0
while needed:
	print(plus[i % 4], end='')
	needed -= 1
	i += 1


from sys import stdin, stdout
from collections import defaultdict

def get_int():
	return int(stdin.readline().strip())

def get_ints():
	return map(int, stdin.readline().strip().split())

def get_array():
	return list(map(int, stdin.readline().strip().split()))

def get_string():
	return stdin.readline().strip()
n = get_int()
c = 'ROYGBIV'
s = 'GBIV'
i = 0
ans = ''
for i in range(n // 7):
	ans += c
n = n % 7
if n >= 4:
	ans += s
for i in range(n % 4):
	ans += s[i]
print(ans)


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
from collections import Counter
import collections
import math
import heapq
import re

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def most_frequent(list):
	return max(set(list), key=list.count)

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def Convert(string):
	li = list(string.split(''))
	return li

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
prime = []
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j

def main():
	n = inin()
	x = 'ROYGBIV'
	y = 'GBIVGB'
	a = n // 7
	b = n % 7
	print(a * x + y[:b])
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


n = int(input())
clrs = 'VIBGYOR'
i = 0
co = 0
while co <= n:
	if i == 7:
		if n - co >= 4:
			i = 0
		else:
			x = n - co
			i = 5 - x - 1
	if co == n:
		break
	print(clrs[i], end='')
	i += 1
	co += 1


from itertools import product
from math import ceil, gcd, sqrt
import string
from decimal import Decimal

def binary_table(string_with_all_characters, length_to_make):
	return [''.join(x) for x in product(string_with_all_characters, repeat=length_to_make)]

def all_possible_substrings(string):
	return [int(string[i:j]) for i in range(len(string)) for j in range(i + 1, len(string) + 1)]

def number_of_substrings(length):
	return int(length * (length + 1) / 2)

def is_prime(num):
	for i in range(2, num):
		if num / i == int(num / i) and num != i:
			return False
	return True
num = int(input())
num -= 7
elements = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
position = 0
build = ''.join(elements)
while num > 0:
	can_not_use = build[0:3] + build[-3:]
	for i in elements:
		if i not in can_not_use:
			build += i
			break
	num -= 1
print(build)


n = int(input().strip())
s = 'BIV'
s1 = 'ROYG'
num = int((n - 3) / 4)
rem = (n - 3) % 4
s2 = s1 * num
output = ''
output += s2
output += s1[0:rem]
output += s
print(output)


ans = ''
ans = 'ROYGBIV'
i = 0
n = int(input()) - 7
while n:
	ans += ans[-4]
	n -= 1
print(ans)


n = int(input())
rem = n % 7
res = 'VIBGYOR' * (n // 7)
a = 'BGYOVIR'
while rem:
	for x in a:
		if x != res[-3] and x != res[-1] and (x != res[-2]) and (x != res[2]) and (x != res[0]) and (x != res[1]):
			res = res + x
			break
	rem -= 1
print(res)


int1 = int(input())
q = 'ROY'
y = 'GBIV' * int1
print(q + y[:int1 - 3])


colors = 'ROYGBIV'
n = int(input())
m = n % 7
d = n // 7
ans = ''
if m == 1 or m == 2 or m == 3:
	ans = colors[:4] + colors[:m] + colors[4:]
else:
	ans = colors + colors[:m]
ans += colors * (d - 1)
print(ans)


import math
import re
from fractions import Fraction
from collections import Counter

class Task:
	n = 0
	answer = []

	def __init__(self):
		self.n = int(input())

	def solve(self):
		n = self.n
		self.answer = 'ROY' + 'GBIV' * ((n - 3) // 4) + 'GBIV'[:(n - 3) % 4]

	def printAnswer(self):
		print(self.answer)
task = Task()
task.solve()
task.printAnswer()


from math import floor

class Solution:

	@classmethod
	def calculate(cls, num_eggs: int) -> str:
		rem_mapping = {1: 'G', 2: 'GB', 3: 'YGB', 4: 'YGBI', 5: 'OYGBI', 6: 'OYGBIV'}
		result = ''
		if num_eggs < 7:
			result += rem_mapping.get(num_eggs)
		else:
			quo = floor(num_eggs / 7)
			rem = floor(num_eggs % 7)
			result += 'ROYGBIV' * quo
			if rem != 0:
				result += rem_mapping.get(rem)
		print(result)
num_eggs = int(input())
Solution.calculate(num_eggs)


from sys import stdin, stdout, exit
import math
from fractions import gcd

def sin():
	return stdin.readline().rstrip()

def listInput():
	return list(map(int, sin().split()))

def printBS(li):
	if not li:
		return
	for i in range(len(li) - 1):
		stdout.write('%d ' % li[i])
	stdout.write('%d\n' % li[-1])
temp = 'ROYGBIV'
ans = temp
n = int(sin())
n -= 7
for i in range(n):
	ans += temp[3 + i % 4]
print(ans)


x = int(input())
pattern = 'ROYGBIV'
s = ''
for i in range(x // 7):
	s += pattern
pattern1 = ''
if x % 7 == 1:
	pattern1 += 'G'
elif x % 7 == 2:
	pattern1 += 'GB'
elif x % 7 == 3:
	pattern1 += 'YGB'
elif x % 7 == 4:
	pattern1 += 'YGBI'
elif x % 7 == 5:
	pattern1 += 'OYGBI'
elif x % 7 == 6:
	pattern1 += 'OYGBIV'
print(s + pattern1)


n = int(input())
s = 'VIBGYOR'
times = n // 7
remains = n % 7
if remains > 4:
	print(f'{s * times}{s[0:remains]}')
else:
	print(f'{s * times}{s[3:3 + remains]}')


colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
n = int(input())
eggs = [i % 7 for i in range(n)]
if n % 7 < 5:
	c = 3
	for i in range(n - n % 7, n):
		eggs[i] = c
		c += 1
print(''.join((colors[egg] for egg in eggs)))


colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
nb_of_points = int(input())
circles_colors = [None for _ in range(nb_of_points)]
index_color = 0
index_circle = 0
for _ in range(nb_of_points):
	for count in range(1, 4):
		temp = (index_circle + count) % len(circles_colors)
		colors[index_color]
		if circles_colors[temp] == colors[index_color]:
			index_color = (index_color + 1) % len(colors)
	circles_colors[index_circle] = colors[index_color]
	index_circle += 1
	index_color = (index_color + 1) % len(colors)
print(''.join(circles_colors))


n = int(input())
s = 'ROYGBIV'
dis = 'GBIV'
sol = s + dis * ((n - 7) // 4 + 1)
print(sol[:n])


res = {}
res[0] = 'R'
res[1] = 'O'
res[2] = 'Y'
res[3] = 'G'
res[4] = 'B'
res[5] = 'I'
res[6] = 'V'
n = int(input())
for i in range(7, n):
	res[i] = res[i - 4]
k = res.values()
k = list(k)
s = ''.join(k)
print(s)


colors = 'ROYGBIV'
n = int(input())
res = colors * (n // 7)
remainders = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
res += remainders[n % 7]
print(res)


n = int(input())
print(n // 7 * 'ROYGBIV', end='')
s = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
print(s[n % 7])


n = int(input())
x = n // 7
if n % 7 == 0:
	print('ROYGBIV' * x)
elif n % 7 == 1:
	print('ROYGBIV' * x + 'G')
elif n % 7 == 2:
	print('ROYGBIV' * x + 'YG')
elif n % 7 == 3:
	print('ROYGBIV' * x + 'YGB')
elif n % 7 == 4:
	print('ROYGBIV' * x + 'OYGB')
elif n % 7 == 5:
	print('ROYGBIV' * x + 'OYGBI')
else:
	print('ROYGBIV' * x + 'ROYGBI')


num = int(input().strip())
f_count = num // 7
rem = num % 7
chain = ['ROYGBIV', 'G', 'GB', 'YGB', 'ROYG', 'ROYGB', 'ROYGBI']
if rem == 0:
	print(chain[0] * f_count)
else:
	print(chain[0] * f_count + chain[rem])


x = int(input())
n = x - 7
s = 'ROYG'
l = ['R', 'O', 'Y', 'G']
i = 0
while n != 0:
	s += l[i]
	i += 1
	if i > 3:
		i = 0
	n -= 1
s += 'BIV'
print(s)


def main():
	n = int(input())
	repeated = n // 7
	sequence = 'ROYGBIV'
	remained = n % 7
	eggs = sequence * repeated + sequence[max(4 - remained, 0):max(4 - remained, 0) + remained]
	print(eggs)
main()


n = input()
n = int(n)
s1 = 'ROY'
s2 = 'GBIV'
j = 0
for i in range(n - 3):
	s1 += s2[j]
	j += 1
	if j == 4:
		j = 0
print(s1)


a = ['G', 'Y', 'O', 'R']
ans = 'VIBGYOR'
n = int(input())
for i in range(8, n + 1):
	ans += a[i % 4]
print(ans)


N = int(input())
print('VIBGYOR' * (N // 7) + 'GYORGYOR'[:N % 7])


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
M = 10 ** 9 + 7
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
n = Int()
color = 'ROYGBIV'
ans = list(color[:3])
color = color[3:]
for i in range(n - 3):
	ans.append(color[i % 4])
print(*ans, sep='')


n = int(input())
l1 = []
colours1 = 'VIBGYOR'
colours2 = 'GYOR'
for i in range(7):
	l1.append(colours1[i % 7])
for i in range(0, n - 7):
	l1.append(colours2[i % 4])
print(''.join(l1))


def s():
	n = int(input())
	print('ROY', ('GBIV' * ((n - 3) // 4 + 1))[:n - 3], sep='')
s()


n = int(input())
s = 'ROYGBIV'
v = n % 7
u = n // 7
r = n - u * 7
s1 = s * u
if v > 4:
	s2 = s[0:0 + r]
elif v <= 4:
	s2 = s[3:3 + r]
elif v == 0:
	s2 = ''
print(s1 + s2)


n = int(input())
colours = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
ans = ''
inc = 0
for i in range(n):
	if i < 7:
		ans += colours[i]
	else:
		ans += colours[(i - 7) % 4 + 3]
print(ans)


n = int(input())
colors = 'ROYGBIV'
four_distance = 'GBIVGB'
sev_color = n // 7
rem = n % 7
out = sev_color * colors + four_distance[:rem]
print(out)


n = int(input())
s = 'ROYGBIV'
if n == 7:
	print(s)
else:
	rem = n - 7
	s1 = 'GBIV'
	if rem % 4 == 0:
		k = int(rem / 4)
		ad = s1 * k
		s += ad
	else:
		k = int(rem / 4)
		ad = s1 * k
		k = rem % 4
		ad = ad + s1[:k]
		s += ad
	print(s)


n = int(input())
c = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
c1 = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
i = n // 7
arr = []
arr += c * i
j = n % 7
arr += c1[j]
print(*arr, sep='')


from math import floor
s = 'ROYGBIV'
b = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
n = int(input())
c = floor(n / 7)
ss = ''
ss += s * c
ss += b[n % 7]
print(ss)


N = int(input()) - 7
print('VIBGYOR' + 'GYOR' * (N // 4) + 'GYOR'[:N % 4])


def solve():
	n = int(input())
	(div, rem, s, rem_s) = (n // 4, n % 4, 'GBIV', '')
	if rem != 0:
		rem_s = s[:rem]
	print('ROY' + (div * s)[3:] + rem_s)
solve()


n = int(input())
l = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
l1 = ['G', 'B', 'I', 'V']
x = n // 7
x = x * 7
s = ''
j = 0
for i in range(x):
	s = s + l[j]
	j = (j + 1) % 7
j = 0
for i in range(x, n):
	s = s + l1[j]
	j = (j + 1) % 4
print(s)


lst = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
z = int(input())
for i in range(z - 7):
	for j in lst:
		if j != lst[-1] and j != lst[-2] and (j != lst[-3]) and (j != lst[0]) and (j != lst[1]) and (j != lst[2]):
			lst.append(j)
			break
print(''.join(lst))


string = 'ROYGBIV'
n = int(input())
if n % 7 > 4:
	print(string * (n // 7), string[7 - n % 7:], sep='')
else:
	print(string * (n // 7), string[3:n % 7 + 3], sep='')


n = int(input())
C = 'ROYGBIV'
ans = [C] * (n // 7)
r = n % 7
if r == 0:
	pass
elif r == 1:
	ans += 'G'
elif r == 2:
	ans += 'GB'
elif r == 3:
	ans += 'GBI'
elif r == 4:
	ans += 'GBIV'
elif r == 5:
	ans += 'GBIVG'
elif r == 6:
	ans += 'GBIVGB'
print(''.join(ans))


def mi():
	return map(int, input().split())
n = int(input())
print('VIBGYOR', end='')
for i in range(n - 7):
	t = i % 4
	if t == 0:
		print('G', end='')
	elif t == 1:
		print('Y', end='')
	elif t == 2:
		print('O', end='')
	else:
		print('R', end='')


seq = 'ROYGBIV'
n = int(input())
x = n // 7
n = n % 7
answer = seq * x
if n == 1:
	answer += 'G'
elif n == 2:
	answer += 'GB'
elif n == 3:
	answer += 'GBI'
elif n == 4:
	answer += 'GBIV'
elif n == 5:
	answer += 'GBIVG'
elif n == 6:
	answer += 'GBIVGB'
print(answer)


rem = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
pattern = 'ROYGBIV'
n = int(input())
(q, r) = (n // 7, n % 7)
res = pattern * q + rem[r]
print(res)


n = int(input())
c = 'BGIORVY'
ans = c + 'ORVY' * 25
print(ans[:n])


N = int(input())
colors = ['', 'G', 'BG', 'IBG', 'VIBG', 'VIBGY', 'VIBGYO']
print('VIBGYOR' * (N // 7) + colors[N % 7])


a = int(input())
s = 'ROYGBIV'
if a > 7:
	print((s * (a // 7) + s[3:] * 2)[:a])
else:
	print(s[:a])


def main():
	n = int(input())
	colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
	l = ['G', 'B', 'I', 'V']
	if n <= 7:
		print(''.join(colors[:n]))
		return
	result = []
	cnt = 0
	for i in range(n):
		if i < 7:
			result.append(colors[i])
			continue
		result.append(l[cnt % 4])
		cnt += 1
	print(''.join(result))
main()


import random
x = int(input())
res = ''
colors = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
res += 'ROYGBIV' * (x // 7)
res += colors[x % 7]
print(res)


n = int(input())
print('VIBGYOR' * (n // 7), end='')
if n % 7 < 5:
	print('GYOR'[:n % 7])
else:
	print('VIBGYOR'[:n % 7])


n = int(input())
c = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
ans = []
for i in range(n - 3):
	ans.append(c[i % 4])
for i in range(3):
	ans.append(c[i + 4])
print(''.join(ans))


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
s = 'ROYGBIV'
n = ii()
s1 = 'ROY'
s2 = 'BIV'
for i in range(n - 6):
	for j in s:
		if not j in s1 and (not j in s2[-1] + s2[-2] + s2[-3]):
			s2 = s2 + j
			break
print(s1 + s2)


import math
n = int(input())
base = 'ROYGBIV'
add = 'BGYOR'
ans = base
while len(ans) < 150:
	ans += ans[-4:]
print(ans[:n])


import sys
input = sys.stdin.readline
n = int(input().strip())
paint = 'ROYGBIV'
for i in range(8, n + 1):
	paint += paint[i - 5]
print(paint)


n = input()
colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
out = ''
fst = True
while len(out) != int(n):
	for c in colors:
		if fst and len(out) != int(n):
			out += c
			fst = False
		elif len(out) != int(n):
			out = c + out
			fst = True
print(out)


import sys

def ints_input():
	return [int(i) for i in sys.stdin.readline().strip('\n').split(' ')]

def print_list(arr):
	sys.stdout.writelines((str(x) + ' ' for x in arr))
	sys.stdout.write('\n')

def fast_input(type=str):
	return type(sys.stdin.readline().strip('\n'))
n = fast_input(int)
ans = 'ROYGBIV'
s = 'GBIVRO'
ans = ans * (n // 7)
if n % 7 == 1:
	ans += 'G'
if n % 7 == 2:
	ans += 'GB'
if n % 7 == 3:
	ans += 'GBI'
if n % 7 == 4:
	ans += 'YGBI'
if n % 7 == 5:
	ans += 'OYGBI'
if n % 7 == 6:
	ans += 'OYGBIV'
print(ans)


class CodeforcesTask78BSolution:

	def __init__(self):
		self.result = ''
		self.n = 0

	def read_input(self):
		self.n = int(input())

	def process_task(self):
		self.n -= 7
		self.result = 'ROYGBIV'
		if self.n >= 4:
			self.result += 'ROYG' * (self.n // 4) + 'BIV'[:self.n % 4]
		elif self.n == 1:
			self.result += 'G'
		elif self.n == 2:
			self.result += 'GB'[:self.n]
		else:
			self.result += 'YGB'[:self.n]

	def get_result(self):
		return self.result
Solution = CodeforcesTask78BSolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


n = int(input())
a = 'ROYGBIV'
b = 'GBIV'
j = 0
for i in range(n):
	if i < 7:
		print(a[i % 7], end='')
	else:
		print(b[j % 4], end='')
		j += 1


n = int(input())
s = 'ROY'
ss = ['G', 'B', 'I', 'V']
for i in range(n - 3):
	s = s + ss[i % 4]
print(s)


n = int(input())
if n % 7 == 0:
	print('VIBGYOR' * int(n / 7))
elif n % 7 == 1:
	print('VIBGYOR' * int(n / 7) + 'G')
elif n % 7 == 2:
	print('VIBGYOR' * int(n / 7) + 'GY')
elif n % 7 == 3:
	print('VIBGYOR' * int(n / 7) + 'GYO')
elif n % 7 == 4:
	print('VIBGYOR' * int(n / 7) + 'GYOR')
elif n % 7 == 5:
	print('VIBGYOR' * int(n / 7) + 'GYORG')
elif n % 7 == 6:
	print('VIBGYOR' * int(n / 7) + 'GYORGY')


n = int(input())
colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
c = ''.join(colors)
w = 'GBIV'
seq = c
count = 7
if count == n:
	print(seq)
else:
	c = 0
	for i in range(7, n):
		seq += w[c % 4]
		c += 1
	print(seq)


k = int(input())
s = 'ROY' + 'GBIV' * k
print(s[:k])


def toch(s, f, l):
	ns = s[:f]
	ns += s[l:]
	ns += s[f:l]
	return ns
n = int(input())
p = n % 7
m = n // 7
ts = 'ROYGBIV'
s = m * ts
s += ts[:p]
if p < 4 and p > 0:
	s = toch(s, (m - 1) * 7 + p + 3, m * 7)
print(s)


from sys import stdin
n = int(input())
s = 'ROYGBIV'
s2 = s[3::-1] * 2
print(s * (n // 7) + s2[:n % 7][::-1])


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return len(set(factors))

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))
MOD = 10 ** 9 + 7
T = 1
for _ in range(T):
	n = int(stdin.readline())
	q = n // 7
	r = n % 7
	ra = ['V', 'VI', 'VIB', 'VIBG', 'VIBGY', 'VIBGYO']
	s = q * 'VIBGYOR'
	if r == 0:
		print(s)
		continue
	if r < 4:
		print(s[:-3] + ra[r - 1] + s[-3:])
	else:
		print(s + ra[r - 1])


from sys import stdin
input = stdin.readline
colors = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
n = int(input())
ans = [4, 5, 6]
i = 0
while len(ans) < n:
	ans.append(i)
	i = (i + 1) % 4
ans = [colors[x] for x in ans]
print(*ans, sep='')


n = int(input())
lst = 'VIBGYOR'
lst = lst[::-1]
for i in range(n - 7):
	lst += lst[-4]
print(lst)


t = int(input())

def proB(n):
	colors = 'ROYGBIV'
	k = n // 7
	ans = ''
	dic = {1: 'G', 2: 'GB', 3: 'GBI'}
	for i in range(k):
		ans += colors
	shift = n % 7
	if shift in dic:
		ans += dic.get(shift)
	else:
		ans += colors[:shift]
	return ans
print(proB(t))


n = int(input())
x = n - 3
ans = []
adder = ['R', 'O', 'Y', 'G']
for i in range(x // 4):
	ans.append('ROYG')
if x % 4 != 0:
	for i in range(x % 4):
		ans.append(adder[i])
ans.append('BIV')
fans = ''.join(ans)
print(fans)


n = int(input())
ans = ['x'] * (n - 7)
b = set('ROYGBIV')
b = list(b)
ans += list(b)
for j in range(n - 7):
	a = []
	for i in range(1, 4):
		if j + i >= n:
			a.append(ans[i - 1])
		else:
			a.append(ans[j + i])
		a.append(ans[j - i])
	for _ in range(7):
		if b[_] not in a:
			ans[j] = b[_]
print(*ans, sep='')


s = 'VIBGYOR'
n = int(input())
s2 = s * (n // 7)
n %= 7
if n == 1:
	s2 += 'G'
if n == 2:
	s2 += 'GY'
if n == 3:
	s2 += 'GYO'
if n == 4:
	s2 += 'GYOR'
if n == 5:
	s2 += 'GYORG'
if n == 6:
	s2 += 'GYORGY'
print(s2)


inp = int(input())
string = 'ROYGBIV'
divPart = inp // 7
remPart = inp % 7
ans = ''
for _ in range(divPart):
	ans += string
remainder = 'GBIVGBI'
ans += remainder[0:remPart]
print(ans)


n = int(input())
a = ['V', 'I', 'B', 'G', 'Y', 'O', 'R']
n -= 7
while n:
	a.append(a[-4])
	n -= 1
print(''.join(a))


n = int(input())
colors = 'ROYGBIV'
ans = []
for i in range(n):
	ans.append(colors[i % 4])
for i in range(3):
	ans[i] = colors[4 + i]
print(''.join(ans))


n = int(input())
s = 'ROYGBIV'
if n <= 7:
	print(s[0:n])
else:
	t = n // 7
	print(s[0:7] * t, end='')
	mod = n % 7
	l = ['NULL', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
	if mod > 0:
		print(l[mod])


N = int(input())
colors = ['', 'G', 'YG', 'OYG', 'ROYG', 'ROYGB', 'ROYGBI']
print('ROYGBIV' * (N // 7) + colors[N % 7])


n = int(input()) - 7
a = n // 4
b = n % 4
print('ROYGBIV' + 'GBIV' * a + 'GBIV'[:b])


def f(n):
	z = n
	L = ['R', 'O', 'Y', 'G', 'B', 'I', 'V']
	L2 = L
	counter = 0
	n = n - 7
	while n != 0:
		L2.append(L[counter])
		if counter == 6:
			counter = 0
		else:
			counter = counter + 1
		n = n - 1
	if (z - 1) % 7 == 0:
		L2[z - 1] = 'G'
	elif (z - 2) % 7 == 0:
		L2[z - 2] = 'G'
		L2[z - 1] = 'B'
	elif (z - 3) % 7 == 0:
		L2[z - 3] = 'G'
		L2[z - 2] = 'B'
		L2[z - 1] = 'I'
	return L2
n = int(input(''))
L = f(n)
s = ''
for i in range(len(L)):
	s = s + L[i]
print(s)


n = int(input())
o = ''
for i in range(0, n // 7 - 1):
	o += 'ROYGBIV'
if n % 7 == 0:
	o += 'ROYGBIV'
elif n % 7 == 1:
	o += 'ROYGRBIV'
elif n % 7 == 2:
	o += 'ROYGRBIVG'
elif n % 7 == 3:
	o += 'ROYGRBIVGB'
elif n % 7 == 4:
	o += 'ROYGBIVROYG'
elif n % 7 == 5:
	o += 'ROYGBIVROYGB'
elif n % 7 == 6:
	o += 'ROYGBIVROYGBI'
print(o)


n = int(input())
s = 'ROYGBIV'
x = n // 7
y = n % 7
s = s * x
if y > 4:
	s += s[:y]
else:
	s += s[3:y + 3]
print(s)


a = int(input())
s = 'ROYGBIV'
s4 = s[:3]
s3 = s[3:]
ns = s3 * 2 + s4[:-1]
if a > 7:
	ls = a // 7
	all_aggs = ls * s + ns
	print(all_aggs[:a])
else:
	print(s[:a])


n = int(input())
colour = 'ROYGBIV'
other = ['', 'G', 'GB', 'YGB', 'YGBI', 'OYGBI', 'OYGBIV']
x = n // 7
s = colour * x
s += other[n % 7]
print(s)


n = int(input())
cols = 'ROYGBIV'
extra = 'GYORGY'
q = n // 7
r = n % 7
print(cols * q + extra[:r][::-1])


n = int(input())
colors = 'VIBGYOR'
ans = colors + (n - 7) // 4 * colors[3:] + colors[3:3 + (n - 7) % 4]
print(ans)