P27388 [AtCoder] ukuku
NOI
题目描述

Problem Description

Given a sequence of length $ N $, $ A_1, A_2, ..., A_N $.

Construct a string $ S $ of length $ N $ consisting only of lowercase English letters (a-z) such that the length of the longest palindrome centered at the $ i $-th character is $ A_i $.

Input Format

The input is given from the standard input in the following format:

$ N $ $ A_1 $ $ A_2 $ $ ... $ $ A_N $

Output Format

Output the answer in one line. If there are multiple valid answers, you may output any one of them.

Sample Input and Output

Sample Input #1

5
1 3 5 3 1

Sample Output #1

ukuku

Sample Input #2

7
1 1 3 5 5 3 1

Sample Output #2

ukekeke

Notes/Hints

Constraints

  • $1 \leq N \leq 2 \times 10^5$
  • $1 \leq A_i \leq N$
  • All inputs are integers.
  • It is guaranteed that a solution exists for the given input.

Sample Explanation 1

The longest palindrome centered at the $ 1 $-st character is u, at the $ 2 $-nd character is uku, at the $ 3 $-rd character is ukuku, at the $ 4 $-th character is uku, and at the $ 5 $-th character is u.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
5 1 3 5 3 1
样例输出
ukuku