Two Mysterious Letters from a Tree#6954

Two Mysterious Letters from a Tree

1 second
128 megabytes
Easy

Your task is to extract letters from a binary tree which is composed of unsigned integers respecting the following rules. Let be the height of a tree. At the level (1 \le k \le n), the tree contains nodes and each node has children nodes (except the leaf nodes at the level which have no children). See the example below to understand the tree formation. Some nodes may have parent nodes.

Example:

You need to walk in a tree on the path that has a maximum summation (e.g. 1 + 5 + 9 = 15). Numbers in each summation cannot cross into different links (e.g. 5 + 7 is illegal). Then, your intermediate task is to calculate numbers for letter extraction. The first number is calculated from i^2 where is a number along the maximum summation path and is the height of a tree.

The second number is a summation of the maximum path (). Regarding to the example above, the first number = 1 + 25 + 81 = and the second number = 1 + 5 + 9 = .

Finally, these two numbers are transformed into two lower case letters from 'a' to 'z' respectively, where 'a' is used for and 'z' is used for . Since there are only letters, a number greater than will reuse the same set of letters. For example = 'd' and = 'p' (that is, the first letter 'a' = or or etc).

Write a program to find the mysterious letters from a given tree.

Input

The first line contains the height (0 < n < 100) of a tree. The second line contains unsigned integer numbers (0 < i < 100) in each level of a tree, consecutively. Assume that there is only one maximum path in a tree.

Output

The first line contains two integer calculated from the rules above, and the second line contains decoded letters.

Examples

Example 1

Loading
Loading