#include <bits/stdc++.h>
using namespace std;
int n, a[100010], g, cnt;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++)
    scanf("%d", &a[i]), g = g == 0 ? a[i] : gcd(a[i], g), cnt += a[i] & 1;
  printf("%d\n", cnt > 1 ? 0 : g);
  string str, ans;
  for (int i = 0; i < n; i++)
    for (int j = 1; j <= a[i] / g / 2; j++) str = str + char('a' + i);
  for (int i = 0; i < n; i++)
    if (a[i] / g & 1) str = str + char(i + 'a');
  for (int i = n - 1; i >= 0; i--)
    for (int j = 1; j <= a[i] / g / 2; j++) str = str + char(i + 'a');
  while (g--) ans = ans + str, reverse(str.begin(), str.end());
  return cout << ans, 0;
}
