#include <bits/stdc++.h>
using namespace std;
long long int m, ct[27];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> m;
  long long int tot = 0;
  long long int cto = 0;
  for (long long int i = 1; i <= m; ++i) {
    cin >> ct[i];
    tot += ct[i];
    if (ct[i] % 2) cto++;
  }
  if (m == 1) {
    cout << ct[1] << '\n';
    while (ct[1]--) cout << 'a';
    cout << '\n';
    return 0;
  }
  long long int n = tot / 2;
  if (cto > 1) {
    cout << 0 << '\n';
    for (long long int i = 1; i <= m; ++i)
      while (ct[i]--) cout << (char)('a' + i - 1);
    cout << '\n';
    return 0;
  }
  if (cto == 1) {
    long long int st = 1;
    while (st <= tot) {
      if (tot % st) {
        st++;
        continue;
      }
      long long int sz = tot / st;
      bool notpos = 0;
      for (long long int i = 1; i <= m; ++i) {
        if (ct[i] % 2) {
          if (ct[i] < sz) notpos = 1;
          long long int rem = ct[i] - sz;
          if (rem % sz) notpos = 1;
        } else {
          if (ct[i] % sz) notpos = 1;
        }
      }
      if (notpos) {
        st++;
        continue;
      }
      cout << tot / st << '\n';
      string ans;
      char chc;
      for (long long int i = 1; i <= m; ++i) {
        if (ct[i] % 2) {
          long long int rem = ct[i] - sz;
          rem /= sz;
          rem /= 2;
          while (rem--) ans += ('a' + i - 1);
          chc = (char)('a' + i - 1);
          continue;
        }
        long long int times = ct[i] / sz;
        times /= 2;
        while (times--) ans += ('a' + i - 1);
      }
      string rev = ans;
      reverse(rev.begin(), rev.end());
      ans += chc;
      ans += rev;
      long long int times = sz;
      string res;
      while (times--) res += ans;
      cout << res << '\n';
      return 0;
    }
    return 0;
  }
  long long int st = m;
  long long int mi = 1e9;
  for (long long int i = 1; i <= m; ++i) mi = min(mi, ct[i]);
  while (st <= n) {
    if (n % st) {
      st++;
      continue;
    }
    if ((2 * n) / st > mi) {
      st++;
      continue;
    }
    long long int sz = (2 * n) / st;
    bool pos = 1;
    for (long long int i = 1; i <= m; ++i)
      if (ct[i] % sz) pos = false;
    if (!pos) {
      st++;
      continue;
    }
    cout << (2 * n) / st << '\n';
    string ans;
    for (long long int i = 1; i <= m; ++i) {
      long long int times = ct[i] / sz;
      while (times--) ans += ('a' + i - 1);
    }
    string rev = ans;
    reverse(rev.begin(), rev.end());
    ans += rev;
    long long int times = (2 * n) / (2 * st);
    string res;
    while (times--) res += ans;
    cout << res << '\n';
    return 0;
  }
}
