PROGRAMMING:Statistical letter ratio
Single linked list is a kind of data structure, which is composed of several nodes. Each node contains data and the address of the next node. Starting from the first node, find the next node through the address of the next node, so loop until the address of the next node is empty.
In this paper, we give a single linked list, each node contains a character (capital English letters). Find the proportion of each letter in the node data of the linked list.
###Input format:
The first line gives the address h of the first node in the list and the total number n of nodes to be given. The node address h is represented by a 5-bit non negative integer, and N is a positive integer no more than 10000.
After that, N lines, each line gives node information in the following format:
*Address Data Next*
Address is the address of the node, data is a letter in A-Z, next is the address of the next node, and the format of address and next is the same as H. When the next value is - 1, it means that the node has no next node, and the list traversal ends.
###Output format:
Output the proportion of each letter in the following format in the order of A-Z:
*Character Percentage*
Where character is an English letter and percentage is a percentage, which is reserved to 2 decimal places. The middle is separated by a space.
If the letter does not appear, it is not output.
###Input example:
```in
00001 10
01044 E 01055
00100 C 01011
00001 D 00100
09996 D 00253
01011 A 00045
00045 V 09876
09876 E 09996
00253 D 00999
00999 A 01044
01055 G -1
```
###Output example:
```out
A 20.00%
C 10.00%
D 30.00%
E 20.00%
G 10.00%
V 10.00%
```
answer:If there is no answer, please comment
In this paper, we give a single linked list, each node contains a character (capital English letters). Find the proportion of each letter in the node data of the linked list.
###Input format:
The first line gives the address h of the first node in the list and the total number n of nodes to be given. The node address h is represented by a 5-bit non negative integer, and N is a positive integer no more than 10000.
After that, N lines, each line gives node information in the following format:
*Address Data Next*
Address is the address of the node, data is a letter in A-Z, next is the address of the next node, and the format of address and next is the same as H. When the next value is - 1, it means that the node has no next node, and the list traversal ends.
###Output format:
Output the proportion of each letter in the following format in the order of A-Z:
*Character Percentage*
Where character is an English letter and percentage is a percentage, which is reserved to 2 decimal places. The middle is separated by a space.
If the letter does not appear, it is not output.
###Input example:
```in
00001 10
01044 E 01055
00100 C 01011
00001 D 00100
09996 D 00253
01011 A 00045
00045 V 09876
09876 E 09996
00253 D 00999
00999 A 01044
01055 G -1
```
###Output example:
```out
A 20.00%
C 10.00%
D 30.00%
E 20.00%
G 10.00%
V 10.00%
```
answer:If there is no answer, please comment