#include <bits/stdc++.h>
int mdc(int menor, int maior) {
  if (maior % menor == 0) return menor;
  if (menor == 1) return 1;
  return mdc(maior % menor, menor);
}
int main() {
  int n[26], sum = 0, num, d, impar = 0, aux = 0;
  scanf("%d", &num);
  scanf("%d", &n[0]);
  d = n[0];
  if (n[0] % 2 == 1) {
    impar++;
    aux = 0;
  }
  for (int i = 1; i < num; i++) {
    scanf("%d", &n[i]);
    if (d < n[i]) {
      d = mdc(d, n[i]);
    } else {
      d = mdc(n[i], d);
    }
    sum += n[i];
    if (n[i] % 2 == 1) {
      aux = i;
      impar++;
    }
  }
  if (impar > 1) {
    printf("0\n");
    for (int i = 0; i < num; i++) {
      for (int j = 0; j < n[i]; j++) {
        printf("%c", i + 97);
      }
    }
    printf("\n");
    return 0;
  }
  if (impar == 1) {
    if (num == 1) {
      printf("%d\n", n[0]);
      for (int k = 0; k < n[0]; k++) {
        printf("a");
      }
    } else if (d == 1) {
      printf("1\n");
      for (int i = 0; i < num; i++) {
        if (i != aux) {
          for (int k = 0; k < (n[i] / 2); k++) {
            printf("%c", i + 97);
          }
        } else {
          for (int k = 0; k < ((n[i] - 1) / 2); k++) {
            printf("%c", i + 97);
          }
        }
      }
      printf("%c", aux + 97);
      for (int i = num - 1; i >= 0; i--) {
        if (i != aux) {
          for (int k = 0; k < (n[i] / 2); k++) {
            printf("%c", i + 97);
          }
        } else {
          for (int k = 0; k < ((n[i] - 1) / 2); k++) {
            printf("%c", i + 97);
          }
        }
      }
    } else {
      printf("%d\n", d);
      for (int i = 0; i < d; i++) {
        for (int j = 0; j < num; j++) {
          for (int k = 0; k < (n[j] / (2 * d)); k++) {
            printf("%c", j + 97);
          }
        }
        printf("%c", aux + 97);
        for (int j = num - 1; j >= 0; j--) {
          for (int k = 0; k < (n[j] / (2 * d)); k++) {
            printf("%c", j + 97);
          }
        }
      }
    }
    printf("\n");
    return 0;
  }
  if (impar == 0) {
    printf("%d\n", d);
    for (int i = 0; i < d; i = i + 2) {
      for (int j = 0; j < num; j++) {
        for (int k = 0; k < (n[j] / d); k++) {
          printf("%c", j + 97);
        }
      }
      for (int j = num - 1; j >= 0; j--) {
        for (int k = 0; k < (n[j] / d); k++) {
          printf("%c", j + 97);
        }
      }
    }
    printf("\n");
    return 0;
  }
}
