func_code_string: #include <bits/stdc++.h>   template <typename T>   class IntegerIterator       : public std::iterator<std::input_iterator_tag, T, std::ptrdiff_t, T*, T> {    public:     explicit IntegerIterator(int value) : value(value) {}     IntegerIterator& operator++() {       ++value;       return *this;     }     IntegerIterator operator++(int) {       IntegerIterator copy = *this;       ++value;       return copy;     }     IntegerIterator& operator--() {       --value;       return *this;     }     IntegerIterator operator--(int) {       IntegerIterator copy = *this;       --value;       return copy;     }     T operator*() const { return value; }     bool operator==(IntegerIterator rhs) { return value == rhs.value; }     bool operator!=(IntegerIterator rhs) { return !(*this == rhs); }       private:     T value;   };   template <typename T>   class IntegerRange {    public:     IntegerRange(T begin, T end) : begin_(begin), end_(end) {}     IntegerIterator<T> begin() const { return IntegerIterator<T>(begin_); }     IntegerIterator<T> end() const { return IntegerIterator<T>(end_); }       private:     T begin_;     T end_;   };   template <typename T>   class ReversedIntegerRange {    public:     ReversedIntegerRange(T begin, T end) : begin_(begin), end_(end) {}     std::reverse_iterator<IntegerIterator<T>> begin() const {       return std::reverse_iterator<IntegerIterator<T>>(           IntegerIterator<T>(begin_));     }     std::reverse_iterator<IntegerIterator<T>> end() const {       return std::reverse_iterator<IntegerIterator<T>>(IntegerIterator<T>(end_));     }       private:     T begin_;     T end_;   };   template <typename T>   IntegerRange<T> range(T to) {     ;     return IntegerRange<T>(0, to);   }   template <typename T>   IntegerRange<T> range(T from, T to) {     ;     return IntegerRange<T>(from, to);   }   template <typename T>   IntegerRange<T> inclusiveRange(T to) {     ;     return IntegerRange<T>(0, to + 1);   }   template <typename T>   IntegerRange<T> inclusiveRange(T from, T to) {     ;     return IntegerRange<T>(from, to + 1);   }   template <typename T>   ReversedIntegerRange<T> downrange(T from) {     ;     return ReversedIntegerRange<T>(from, 0);   }   template <typename T>   ReversedIntegerRange<T> downrange(T from, T to) {     ;     return ReversedIntegerRange<T>(from, to);   }   template <typename T>   ReversedIntegerRange<T> inclusiveDownrange(T from) {     ;     return ReversedIntegerRange<T>(from + 1, 0);   }   template <typename T>   ReversedIntegerRange<T> inclusiveDownrange(T from, T to) {     ;     return ReversedIntegerRange<T>(from + 1, to);   }   template <typename R>   void sort(R& range) {     std::sort(range.begin(), range.end());   }   template <typename R, typename Comp>   void sort(R& range, Comp comp) {     std::sort(range.begin(), range.end(), comp);   }   template <typename R>   void reverse(R& range) {     std::reverse(range.begin(), range.end());   }   template <typename R, typename T>   auto lower_bound(const R& range, const T& value) -> decltype(range.begin()) {     return std::lower_bound(range.begin(), range.end(), value);   }   template <typename R, typename T, typename Comp>   auto lower_bound(const R& range, const T& value, Comp comp)       -> decltype(range.begin()) {     return std::lower_bound(range.begin(), range.end(), value, comp);   }   template <typename R, typename T>   auto upper_bound(const R& range, const T& value) -> decltype(range.begin()) {     return std::upper_bound(range.begin(), range.end(), value);   }   template <typename R, typename T, typename Comp>   auto upper_bound(const R& range, const T& value, Comp comp)       -> decltype(range.begin()) {     return std::upper_bound(range.begin(), range.end(), value, comp);   }   template <typename R>   auto min_element(const R& range) -> decltype(range.begin()) {     return std::min_element(range.begin(), range.end());   }   template <typename R>   auto max_element(const R& range) -> decltype(range.begin()) {     return std::max_element(range.begin(), range.end());   }   template <typename R>   bool next_permutation(R& range) {     return std::next_permutation(range.begin(), range.end());   }   template <typename T>   void unique(std::vector<T>& range) {     range.erase(std::unique(range.begin(), range.end()), range.end());   }   template <typename R>   R sorted(R range) {     sort(range);     return range;   }   template <typename R, typename Comp>   R sorted(R range, Comp comp) {     sort(range, comp);     return range;   }   template <typename R>   R reversed(R range) {     reverse(range);     return range;   }   template <typename T>   T gcd(T a, T b) {     while (b) {       T tmp = a % b;       a = b;       b = tmp;     }     return a;   }   using namespace std;   class TaskC {    public:     void solve(std::istream& in, std::ostream& out) {       int n;       in >> n;       vector<int> v(n);       for (int i : range(26)) {         in >> v[i];       }       auto x = solve(v);       out << x.first <<   n  << x.second;     }     pair<int, string> solve(vector<int> v) {       int cntOdd = 0;       char odd;       for (int i : range(v.size())) {         if (v[i] % 2 == 1) {           ++cntOdd;           odd =  a  + i;         }       }       if (cntOdd > 1) {         return {0, go(v)};       }       if (cntOdd == 1) {         int g = 0;         for (int i : range(v.size())) {           g = gcd(g, v[i]);         }         auto r = go(v, 2 * g);         r = r + odd + reversed(r);         string res;         for (int i = 0; i < g; ++i) {           res += r;         }         return {g, res};       }       int g = 0;       for (int i : range(v.size())) {         g = gcd(g, v[i]);       }       assert(g % 2 == 0);       string r = go(v, g);       r = r + reversed(r);       string res;       for (int i = 0; i < g / 2; ++i) {         res += r;       }       return {g, res};     }     string go(vector<int> v, int del = 1) {       string res;       for (int i : range(v.size())) {         res += string(v[i] / del, char( a  + i));       }       return res;     }   };   int main() {     std::ios_base::sync_with_stdio(false);     TaskC solver;     std::istream& in(std::cin);     std::ostream& out(std::cout);     in.tie(0);     out << std::fixed;     out.precision(20);     solver.solve(in, out);     return 0;   }   