LogiQuest

348. Text Histogram

EasyCounting

For each distinct value in increasing order, print the value, a colon, a space and a # for each occurrence.

Input format

Line 1: n Line 2: n integers

Output format

One line per distinct value.

Example 1

Input

6
3 1 3 2 3 1

Output

1: ##
2: #
3: ###

Example 2

Input

1
0

Output

0: #

Constraints

1 ≤ n ≤ 1000

Read input from standard input and print the answer to standard output. Your code is judged against 3 test cases, most of them hidden.

Loading the MyLoginn IDE…