UOFTCB - A Careful Reply
Weird! A week into school, Bob has received $T$ ($1 \leq T \leq 100$) texts in a row from some girl he's never seen before, Alice. Obviously, he's promptly checked her out on Facebook, and likes what he sees! Now, the hard part - he needs to craft some appropriate replies.
Everyone knows that the affection conveyed in a text is measured by the number of hearts it contains - in other words, the number of times it contains the string "<3". Bob certainly wants to reciprocate Alice's seemingly romantic feelings, but doesn't want to come off as overly desperate. He's decided that his response to each text should contain exactly one more heart than the received text. In fact, he doesn't really want to convey any other information, so his reply will consist of only this number of instances of the string "<3", separated by single spaces (and with no leading or trailing spaces).
After waiting the appropriate amount of time (he wouldn't want to reply too quickly, after all), it's time to make a good impression on Alice - Bob wants to determine the perfect response to each of the $T$ texts!
Input
Line 1: 1 integer, $T$
For each text:
Line 1: 1 string of at most 1000 characters, the received text
Output
For each text:
1 string of characters, the reply to the text
Example
Input: 4
hey handsome <3 :)
u busy tonite?
<3 how about sum dinner? <<33<3 luv u
plz say yes <\3 Output: <3 <3
<3
<3 <3 <3 <3
<3
Explanation of Sample
The received texts contain 1, 0, 3, and 0 hearts, respectively. Therefore, their corresponding replies should consist of 2, 1, 4, and 1 hearts, respectively.
Added by: | SourSpinach |
Date: | 2014-02-18 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | Own problem, used in the 2013 UofT ACM Tryouts |