Frequency List

Sample Input

Sample Output