Compression
Vasya is not satisfied with the quality of the spam filter in his mailbox and decided to build his own. He has prepared a list L_0 of 1 ≤ N_0 ≤ 5·10^4 words. Each of the words is at least 1 and at most 40 characters long. In his opinion, any message that contains even one of those words is spam.
The list is quite big and Vasya wants to compress it. More precisely: he wants to replace the list L_0 with a list L_1, of non-empty words such that for every word w_0L_0 exists a word w_1L_1, where w_1 is a prefix of w_0. Obviously, if the words in L_1 are too short, then too many messages will be falsely qualified as spam. After some thinking, Vasya came up with the following condition: he wants to find the list L_1 so as to minimize the penalty where |w| denotes the length of the word w.
Help him solve this problem.
Input
The first input line contains N_0, the number of words in the list L_0. The following N_0 lines contain the words from the list L_0, consisting of lowercase letters only.
Output
The first output line should contain the value of P corresponding to the optimal list L_1. The second line should contain N_1, the number of words in the list L_1. The following lines should contain the words from the list L_1. If there are several optimal solutions, any one of them is acceptable.