Under construction

Still being built. Things may change

Mean Words

Time limit1sMemory limit1024 MB

Summary
Given N words, build one word by taking the floor of the average ASCII value at each position across the words that reach that position.
Level

Easy2 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

Little Timmy got caught by his teacher for using some mean words. After he was sent to the principal, Timmy learned his lesson. Next time, he wants to make sure he does not get caught.

Timmy takes all the mean words he plans to say and combines them into a single mean word. He goes through each position in turn. For each position, he averages the characters in that position across all the words that have a character there, rounds the average down, and uses the resulting character.

The value of a character is its ASCII value. The value of a is 9797, the value of b is 9898, and so on up to z, which has value 122122. Average the ASCII values, round down to the nearest integer, and use the character with that value.

Input

The first line contains a single integer NN (2≤N≤1 0002 \leq N \leq 1\,000), the number of words. Each of the next NN lines contains a single word of between 11 and 4545 lowercase English characters.

Output

Output the mean word that Timmy builds by following the procedure above.

Examples3

  1. Example 1

    Input
    2
    mean
    word
    
    Expected output
    rjii
    
  2. Example 2

    Input
    4
    words
    of
    various
    length
    
    Expected output
    rfpfrns
    
  3. Example 3

    Input
    3
    a
    b
    b
    
    Expected output
    a