n=int(input())
def fib(n):
    f=[1,1]
    for e in range(2,n+1):
        a=f[e-1]
        b=f[e-2]
        f.append(a+b)
    return(f)
f=fib(n)
s=''
print(f)
for i in range(1,n+1):
    if i in f:
        s=s+'O'
    else:
        s=s+'o'
print(s)
