Rebus
In the last English lesson, Petryk received a homework assignment involving rebuses. Each rebus consists of a sequence of pictures, where apostrophes can be placed on either side of each picture. Each picture represents a specific word. If there are i apostrophes before a picture and j apostrophes after it, this indicates that i letters should be removed from the beginning of the word and j letters from the end. The remaining part of the word should replace the picture and its apostrophes. This process is repeated for each picture and its surrounding apostrophes. Finally, the resulting segments are combined into a single word, which is the solution to the rebus.
Petryk can easily associate each picture with a word, but he finds it tedious to remove the unnecessary letters and combine the words. Therefore, he has asked for your help. You are given a string consisting of lowercase Latin letters, apostrophes (character code 39), and spaces that separate words. An apostrophe belongs to a word if there is no space between them. If an apostrophe is to the left of a word, one letter is removed from the beginning; if to the right, from the end. All words are then combined into one.
For example, consider the string "team ' ' ' ' school ' ' olympiad' ' '". In the first word, no changes are needed as there are no apostrophes associated with it. In the second word, the first four letters are removed, resulting in "ol", and from the third word, "ymp" is obtained. After combining these segments, the resulting string is "teamolymp".
Input
The first line of the input file contains a rebus, no longer than 100 characters, that needs to be solved. It is guaranteed that the string contains only apostrophes (character code — 39), spaces, and lowercase Latin letters, and that the rebus is valid — no word requires more letters to be removed than its length.
Output
Output a single word — the solution to the rebus.
Note: For clarity, the test example is also depicted in the accompanying image, which provides a more realistic representation.