Cryptanalysis is the process of breaking someone else's cryptographicwriting. This sometimes involves some kind of statistical analysis ofa passage of (encrypted) text. Your task is to write a programwhich performs a simple analysis of a given text.
The first line of input contains a single positive decimal integer
n. This is the number of lines which follow in the input. The next
n lines will contain zero or more characters (possibly includingwhitespace). This is the text which must be analyzed.
Each line of output contains a single uppercase letter, followed by asingle space, then followed by a positive decimal integer. The integerindicates how many times the corresponding letter appears in the inputtext. Upper and lower case letters in the input are to be consideredthe same. No other characters must be counted. The output must besorted in descending count order; that is, the most frequent letter ison the first output line, and the last line of output indicates theleast frequent letter. If two letters have the same frequency, thenthe letter which comes first in the alphabet must appear first in theoutput. If a letter does not appear in the text, then that letter mustnot appear in the output.
What's Cryptanalysis? Cryptanalysis is the process of breaking someone else's cryptographicwriting. This sometimes involves some kind of statistical analysis ofa passage of (encrypted) tex