output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      X Y Z
attempt: from itertools import permutations, count, chain
  from collections import deque
  
  
  def helper(s):
      for i in range(len(s)):
          yield s[i:] + s[:i]
  
  
  def naive(a, b, c):
      return max(min(helper(s)) for s in permutations("a" * a + "b" * b + "c" * c))
  
  
  def solve(a, b, c):
      def helper(a, b, c):
          cnt = (a, b, c).count(0)
          if cnt == 3:
              return []
          elif cnt == 2:
              n, i = max((x, i) for i, x in enumerate((a, b, c)))
              return [i] * n
          elif cnt == 1:
              (l, nl), (u, nu) = ((i, x) for i, x in enumerate((a, b, c)) if x != 0)
  
              n = nl // nu
              return tuple(reversed(([u] + [l] * n) * nu + [l] * (nl - n * nu)))
  
          n0 = c % a
          n1 = a - n0
  
          m0 = b % n1
          m1 = n1 - m0
          R = helper(m1, m0, n0)
  
          nc = c // a
          nb = b // n1
  
          s = (
              [0] + [2] * nc + [1] * nb,
              [0] + [2] * nc + [1] * (nb + 1),
              [0] + [2] * (nc + 1),
          )
          return tuple(chain.from_iterable(s[r] for r in R))
  
      s = ("a", "b", "c")
      return "".join(s[i] for i in helper(a, b, c))
  
  
  print(solve(*map(int, input().split())))
  
problem_description: Statement
  
  For a string S, let f(S) be the lexicographically smallest cyclic shift of S.
  For example, if S = `babca`, f(S) = `ababc` because this is the smallest among
  all cyclic shifts (`babca`, `abcab`, `bcaba`, `cabab`, `ababc`).
  
  You are given three integers X, Y, and Z. You want to construct a string T
  that consists of exactly X `a`s, exactly Y `b`s, and exactly Z `c`s. If there
  are multiple such strings, you want to choose one that maximizes f(T)
  lexicographically.
  
  Compute the lexicographically largest possible value of f(T).
samples: [{"input": "2 2 0", "output": "abab\n    \n\nT must consist of two `a`s and two `b`s.\n\n  * If T = `aabb`, f(T) = `aabb`.\n  * If T = `abab`, f(T) = `abab`.\n  * If T = `abba`, f(T) = `aabb`.\n  * If T = `baab`, f(T) = `aabb`.\n  * If T = `baba`, f(T) = `abab`.\n  * If T = `bbaa`, f(T) = `aabb`.\n\nThus, the largest possible f(T) is `abab`.\n\n* * *"}, {"input": "1 1 1", "output": "acb"}]