#include <bits/stdc++.h>
using namespace std;
int n, sum;
int a[30];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  for (int i = sum; i >= 1; i--) {
    if (sum % i == 0) {
      bool ok = true;
      for (int j = 0; j < n; j++) {
        if (a[j] % i) {
          ok = false;
        }
      }
      if (!ok) {
        continue;
      }
      if (i % 2 == 0) {
        cout << i << '\n';
        string b, rb;
        for (int j = 0; j < n; j++) {
          for (int k = 0; k < a[j] / i; k++) {
            b.push_back(char('a' + j));
          }
        }
        rb = b;
        reverse(rb.begin(), rb.end());
        for (int j = 0; j < i / 2; j++) {
          cout << b << rb;
        }
        return 0;
      } else {
        int cnt = 0;
        for (int j = 0; j < n; j++) {
          if ((a[j] / i) & 1) {
            cnt++;
          }
        }
        if (cnt <= 1) {
          cout << i << '\n';
          string tmp;
          char c = '!';
          for (int j = 0; j < n; j++) {
            a[j] /= i;
            if (a[j] & 1) {
              c = char('a' + j);
              a[j]--;
            }
          }
          for (int j = 0; j < n; j++) {
            for (int k = 0; k < a[j] / 2; k++) {
              tmp.push_back(char('a' + j));
            }
          }
          if (c != '!') {
            tmp.push_back(c);
          }
          for (int j = n - 1; j >= 0; j--) {
            for (int k = 0; k < a[j] / 2; k++) {
              tmp.push_back('a' + j);
            }
          }
          for (int j = 1; j <= i; j++) {
            cout << tmp;
          }
          return 0;
        }
      }
    }
  }
  cout << 0 << '\n';
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < a[i]; j++) {
      cout << char('a' + i);
    }
  }
}
