#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
int a[128];
int main() {
  int n, cnt = 0, m = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i + 'a'];
    m = gcd(a[i + 'a'], m);
    cnt += a[i + 'a'] & 1;
  }
  string s = "";
  if (cnt > 1) {
    puts("0");
    for (int i = 0; i < n; ++i)
      while (a[i + 'a']--) putchar(i + 'a');
    puts("");
    return 0;
  }
  cout << m << endl;
  for (int i = 0; i < n; ++i) a[i + 'a'] /= m;
  if (cnt == 1) {
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < a[i + 'a'] / 2; ++j) s.push_back(i + 'a');
    for (int i = 0; i < n; ++i)
      if (a[i + 'a'] & 1) s.push_back(i + 'a');
    for (int i = n - 1; i >= 0; --i)
      for (int j = 0; j < a[i + 'a'] / 2; ++j) s.push_back(i + 'a');
  } else
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < a[i + 'a']; ++j) s.push_back(i + 'a');
  for (int i = 0; i < m; ++i) {
    if (i & 1)
      cout << s;
    else
      for (int j = s.size() - 1; j >= 0; --j) putchar(s[j]);
  }
  puts("");
  return 0;
}
