#!/usr/bin/env python3 # %% import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # %% x, y, z = map(int, read().split()) # %% def simulate(code): stack = [] for ch in code: if ch == 'c': stack.append(x) elif ch == 'w': stack.append(y) elif ch == 'C': a = stack.pop() b = stack.pop() stack.append(a + b) elif ch == 'W': a = stack.pop() b = stack.pop() stack.append(a - b) else: raise ValueError return stack[-1] def to_code(A, B): if A == B == 0: return 'ccW' if A == 0 and B > 0: return 'w' * B + 'C' * (B - 1) if A > 0 and B == 0: return 'c' * A + 'C' * (A - 1) if A > 0 and B > 0: return 'c' * A + 'w' * B + 'C' * (A + B - 1) if A > 0 and B < 0: return 'w' * (-B) + 'C' * (-B - 1) + 'c' * A + 'C' * (A - 1) + 'W' if A < 0 and B > 0: return 'c' * (-A) + 'C' * (-A - 1) + 'w' * B + 'C' * (B - 1) + 'W' print(A, B) def solve(x, y, z): for A in range(5100, -5100, -1): if y == 0: B = 0 else: B = (z - A * x) // y if A * x + B * y == z: if 2 * (abs(A) + abs(B)) - 1 <= 10000: return to_code(A, B) return 'NO' code = solve(x, y, z) if code != 'NO': assert simulate(code) == z print(code) # %%