Decoding the message

Chico and Maria are relatives that live in different towns. As they inhabit a rural area, it is very difficult for them to keep in touch. One way they found to overcome their communication problem was to send a line through their parents that used to visit each other. The point is that Chico and Maria did not want that their parents read their messages, and they decided to create a secret code for the messages. The code is not very sophisticated, but you should keep in mind Chico and Maria are just children. In general, the meaning of a message is based on a letter of each word, in a way that they will form a message with the first letter of the first word, the second letter of the second word and so on. If a word does not have enough letters, the following word should be used. For example, if you are analyzing the third word, you should consider its third letter, but if it just has two letters, then you should try to form a decoded word with the third letter of the fourth word. When the end of a line is reached, you should finish the current decoded word and should start to form another one from the first letter of the first word in the next line. Your task is to translate a message according to Chico and Maria’s secret code. Input The first line of input gives the number of cases, T (1 ≤ T ≤ 30), then there is a blank line before the first test case. Each test case represents a message, which is composed by 1 ≤ N ≤ 100 lines and each line is composed by 1 ≤ M ≤ 30 words. Two words in the same line are separated by one or more white spaces. A word is formed by the letters A-Z and a-z and has at most 30 letters. The only symbols that appear in the input are the alphabetic letters and white spaces. There will be a blank line after each message. Output For each test case you must print the number of the test case and each word of the decoded message, one per line (look the sample output for the exact format). You must print a blank line between each test case. Sample Input 2 Hey good lawyer as I previously previewed yam does a soup First I give money to Teresa after I inform dad of your horrible soup Sample Output Case #1: How

2/2 are you Case #2: Fine and you