#!/usr/bin/env python3
import sys
import random

n = int(sys.argv[1])
ans = int(sys.argv[2])
seed = int(sys.argv[3])

random.seed(seed)

s = ""

if ans == 0:
    x = random.randrange(3)
    if x == 0:
        s += '-'
        for i in range(n-2):
            y = random.randrange(2)
            if y == 0:
                s += '-'
            if y == 1:
                s += '+'
        s += '+'
    if x == 1:
        s += '-'
        for i in range(n-2):
            y = random.randrange(2)
            if y == 0:
                s += '-'
            if y == 1:
                s += '+'
        s += '-'
    if x == 2:
        s += '+'
        for i in range(n-2):
            y = random.randrange(2)
            if y == 0:
                s += '-'
            if y == 1:
                s += '+'
        s += '+'

if ans == 1:
    s += '+'

    for i in range(n-2):
        y = random.randrange(2)
        if y == 0:
            s += '-'
        if y == 1:
            s += '+'

    s += '-'

print(n)
print(s)
