PROGRAMMING:Document similarity based on word frequency
To achieve a simple original file similarity calculation, that is to define the similarity based on the proportion of the common words of two files in the total words. In order to simplify the problem, we don't consider Chinese (because word segmentation is too difficult), but only consider English words no less than 3 and no more than 10 in length, and only consider the first 10 letters if the length is more than 10.
###Input format:
Input first gives a positive integer, $$n $$($$Le 100 $$), which is the total number of files. Then, the content of each file is given in the following format: first, the body of the file is given, and finally, only one character '#' is given in a line to indicate the end of the file. At the end of the content of $$n $$files, the total number of queries is given as $$M $$($$Le 10 ^ 4 $$), followed by $$M $$lines. Each line gives a pair of file numbers separated by spaces. It is assumed that the files are numbered from 1 to $$n $, in the order given.
###Output format:
For each query, the similarity of the two files is output in one line, that is, the percentage of the common vocabulary of the two files in the total vocabulary of the two files, which is accurate to 1 decimal place. Note that a "word" here only includes English words that are only composed of English letters and are no less than 3 and no more than 10 in length, and only the first 10 letters are considered for words that are more than 10 in length. Words are separated by any non English letters. In addition, the same word with different case is considered to be the same word, for example, "you" and "you" are the same word.
###Input example:
```in
three
Aaa Bbb Ccc
#
Bbb Ccc Ddd
#
Aaa2 ccc Eee
is at Ddd@Fff
#
two
1 2
1 3
```
###Output example:
```out
50%
33.3%
```
answer:If there is no answer, please comment
###Input format:
Input first gives a positive integer, $$n $$($$Le 100 $$), which is the total number of files. Then, the content of each file is given in the following format: first, the body of the file is given, and finally, only one character '#' is given in a line to indicate the end of the file. At the end of the content of $$n $$files, the total number of queries is given as $$M $$($$Le 10 ^ 4 $$), followed by $$M $$lines. Each line gives a pair of file numbers separated by spaces. It is assumed that the files are numbered from 1 to $$n $, in the order given.
###Output format:
For each query, the similarity of the two files is output in one line, that is, the percentage of the common vocabulary of the two files in the total vocabulary of the two files, which is accurate to 1 decimal place. Note that a "word" here only includes English words that are only composed of English letters and are no less than 3 and no more than 10 in length, and only the first 10 letters are considered for words that are more than 10 in length. Words are separated by any non English letters. In addition, the same word with different case is considered to be the same word, for example, "you" and "you" are the same word.
###Input example:
```in
three
Aaa Bbb Ccc
#
Bbb Ccc Ddd
#
Aaa2 ccc Eee
is at Ddd@Fff
#
two
1 2
1 3
```
###Output example:
```out
50%
33.3%
```
answer:If there is no answer, please comment