c = 'c'; w = 'w'; C = 'C'; W = 'W' MAX = 10000 def dame(): print("mourennaihasimasenn") x, y, z = map(int, input().split()) if x < y: # x >= y となるようにそろえる # cとwの中身も入れ替える x, y = y, x c, w = w, c if z == 0: # x - x = 0 print('ccW') elif x == y == 0: dame() elif y == 0: if z % x != 0: dame() nc = z // x nC = nc - 1 if nc + nC > MAX: dame() else: print(c * nc + C * nC) else: # cの個数について全探索 for nc in range(1, MAX): nC1 = nc - 1 # cの直後に置くC nC2 = 0 # wの直後に置くC # 対応する整数nwが存在しなければ次のncへ if (z - x * nc) % y != 0: continue nw = (z - x * nc) // y nW = 0 if nw > 0: # +y+y... nC2 += nw elif nw < 0: # -y-y... nw = -nw nW += nw if nc + nC1 + nw + nC2 + nW <= MAX: print(nc, nC1, nw, nC2, nW) print(c * nc + C * nC1 + w * nw + C * nC2 + W * nW) exit() # 見つからなかったらダメ dame()