#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const double eps = (double)1e-8;
const int mod = (int)1000000007;
const int maxn = (int)1e5 + 5;
int n, m, l, c, kol, ans;
long long x;
int p[maxn], t[maxn], k[maxn], a[30];
vector<int> pr[maxn], prs;
char b[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  c = 0;
  for (int i = (1); i <= (n); i++) {
    cin >> a[i];
    m += a[i];
    if (a[i] & 1) c++;
  }
  if (n == 1) {
    cout << a[1] << "\n";
    for (int i = (1); i <= (a[1]); i++) cout << 'a';
    return 0;
  }
  if (c >= 2) {
    cout << 0 << "\n";
    c = 1;
    for (int i = (1); i <= (m); i++) {
      while (a[c] == 0) c++;
      a[c]--;
      cout << char('a' + c - 1);
    }
    return 0;
  }
  for (int i = (2); i <= (1e5); i++) {
    if (p[i]) continue;
    x = (long long)i;
    while (x <= 1e5) {
      for (int j = x; j <= 1e5; j += x) {
        p[j] = 1;
        pr[j].push_back(i);
      }
      x *= (long long)i;
    }
  }
  for (int i = (0); i < (pr[a[1]].size()); i++) {
    k[pr[a[1]][i]]++;
    t[pr[a[1]][i]] = 1;
  }
  for (int i = (2); i <= (n); i++) {
    x = a[i];
    kol = 0;
    for (int j = (0); j < (pr[x].size()); j++) {
      kol = 1;
      while (j + 1 < pr[x].size() && pr[x][j + 1] == pr[x][j]) {
        j++;
        kol++;
      }
      if (t[pr[x][j]] != i - 1) {
        k[pr[x][j]] = 0;
        continue;
      }
      t[pr[x][j]] = i;
      k[pr[x][j]] = min(kol, k[pr[x][j]]);
    }
  }
  for (int i = (0); i < (pr[a[1]].size()); i++) {
    if (t[pr[a[1]][i]] != n) k[pr[a[1]][i]] = 0;
    for (int j = (1); j <= (k[pr[a[1]][i]]); j++) {
      prs.push_back(pr[a[1]][i]);
    }
    k[pr[a[1]][i]] = 0;
  }
  c = 0;
  for (int i = (1); i <= (n); i++) {
    for (int j = (0); j < (prs.size()); j++) {
      a[i] /= prs[j];
    }
    if (a[i] & 1) c++;
  }
  l = 0;
  for (int i = (1); i <= (n); i++) l += a[i];
  if (c >= 2) {
    l *= 2;
    for (int i = (1); i <= (n); i++) a[i] *= 2;
    ans = 2 * (m / l);
    c = 1;
    for (int i = (1); i <= (l / 2); i++) {
      while (a[c] <= 0) c++;
      a[c] -= 2;
      b[i] = char('a' + c - 1);
      b[l - i + 1] = char('a' + c - 1);
    }
    for (int i = (l + 1); i <= (m); i++) {
      b[i] = b[(i - 1) % l + 1];
    }
  } else {
    ans = m / l;
    for (int i = (1); i <= (n); i++)
      if (a[i] & 1) c = i;
    b[l / 2 + 1] = char('a' + c - 1);
    a[c]--;
    c = 1;
    for (int i = (1); i <= (l / 2); i++) {
      while (a[c] <= 0) c++;
      a[c] -= 2;
      b[i] = char('a' + c - 1);
      b[l - i + 1] = char('a' + c - 1);
    }
    for (int i = (l + 1); i <= (m); i++) {
      b[i] = b[(i - 1) % l + 1];
    }
  }
  cout << ans << "\n";
  for (int i = (1); i <= (m); i++) cout << b[i];
  return 0;
}
