#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e9;
const long long inf = (long long)3e18;
const int base = 1000 * 1000 * 1000;
const int maxn = 20;
const long double pi = acosl(-1.0);
const long double eps = 1e-5;
void error() { exit(1); }
int nod(int a, int b) {
  while (a != 0 && b != 0) a %= b, swap(a, b);
  return a + b;
}
string calc(vector<int> d, int n) {
  vector<int> a(n, 0);
  int odd = 0;
  int e = -1;
  int k = d.front();
  for (int i = 0; i < n; i++) {
    if (d[i] % 2) odd++, e = i;
    k = nod(k, d[i]);
  }
  string ans, t;
  if (k != 1) {
    for (int i = 0; i < n; i++) a[i] = d[i] / k;
    ans = t = calc(a, n);
    reverse(t.begin(), t.end());
    string res = "";
    for (int i = 0; i < k; i++) {
      if (i & 1)
        res += t;
      else
        res += ans;
    }
    return res;
  } else {
    for (int i = 0; i < n; i++) a[i] = d[i] / 2;
    if (odd == 1) {
      for (int i = 0; i < n; i++) ans += string(a[i], 'a' + i);
      t = ans;
      reverse(t.begin(), t.end());
      return ans + (char)('a' + e) + t;
    } else {
      for (int i = 0; i < n; i++) ans += string(d[i], 'a' + i);
      return ans;
    }
  }
}
int palindrom(string s) {
  s += s;
  int m = (int)s.size() / 2;
  int n = (int)s.size();
  int res = 0;
  if (m % 2) {
    vector<int> d(n);
    int l = 0, r = -1;
    for (int i = 0; i < n; i++) {
      int k = (i > r ? 0 : min(d[l + r - i], r - i)) + 1;
      while (i + k < n && i - k >= 0 && s[i + k] == s[i - k]) k++;
      if (2 * k - 1 >= m && m / 2 < i && i <= n - m / 2) res++;
      d[i] = k--;
      if (i + k > r) l = i - k, r = i + k;
    }
  } else {
    vector<int> d(n);
    int l = 0, r = -1;
    for (int i = 0; i < n; i++) {
      int k = (i > r ? 0 : min(d[l + r - i + 1], r - i + 1)) + 1;
      while (i + k - 1 < n && i - k >= 0 && s[i + k - 1] == s[i - k]) k++;
      if (2 * (k - 1) >= m && m / 2 - 1 < i && i < n - m / 2) res++;
      d[i] = --k;
      if (i + k - 1 > r) l = i - k, r = i + k - 1;
    }
  }
  if (n == 2) res = 1;
  return res;
}
void solve() {
  int n;
  cin >> n;
  vector<int> d(n);
  for (int i = 0; i < n; i++) cin >> d[i];
  string ans = calc(d, n);
  int res = palindrom(ans);
  cout << res << '\n' << ans << endl;
}
int main() {
  solve();
  return 0;
}
