At the end of the week, John asked Mary to send him an urgent sales report. Mary was in a hurry because she was leaving for her holiday. She then copy-pasted the sales sheet on an email, sent it to John and went out. She did not want to be annoyed with work issues, so she left without telling anyone where she would be. She announced that she would be simply not available for the next two weeks, turned off her cell phone, and left.
When John received the message he realized that the report had no spaces at all! He knew that the report should have a header line with product codes of the form $P_1, P_2, ...., P_N$ and the word $\texttt{Totals}$ at the end. Then there would be several lines reporting product sales for the different sellers of Mary’s office. Each seller was identified with a name composed by one word (only alphabetical characters). The line corresponding to a seller should begin with his/her name, followed by the number of sold products, according to the columns’ report. The last line of the report should begin with the two letters $\texttt{TP}$ followed by the totals of each column in the report (of course, no seller’s name began with the letters $\texttt{TP}$). John knew that there were no negative numbers in the report, a zero quantity was reported with a single $0$, and there were no leading zeros when reporting a positive quantity.
At this point, John decided to reconstruct Mary’s report. He knew that there could be more than one possible result, but he wanted to do it anyway with the first consistent solution that he could find (maybe he could fix any mistakes when Mary comes back).
Could you help John with the recovering of Mary’s sales report?
Output
For each test case in the input your program must produce one possible Mary’s report. Each line of the answer must be left aligned, with its items separated by a single space, and with no space at its end.
The output must be written to standard output.