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

n = int(sys.argv[1])
pos = int(sys.argv[2]) # -1 for rand
seed = int(sys.argv[3])

random.seed(seed)

s = ""

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

print(n)
print(s)
