- Time limit: 1.00 s
- Memory limit: 512 MB
You are given a text that consists of n words that are currently separated from each other with a single space. Each word consists of lowercase Latin letters and is at most 20 characters long. Your task is to split the text to multiple lines and extend the spaces so that each line is exactly 50 characters long and begins & ends with a lowercase Latin letter. It is guaranteed that n is an even number.
Formally, you are allowed to perform two kinds of operations on the text arbitrarily many times:
- Pick a space character and replace it with a newline.
- Pick a space character and replace it with 2 consecutive spaces.
Input
The first line contains a string of space-separated words: the input text.
Output
Print the input text with any correct alignment. It is guaranteed that a valid way to align the text always exists.
Constraints
- The input contains at most 1000 words
- The length of each word is at most 20
Example
Input:
to be fair you have to have a very high iq to understand rick and morty the humor is extremely subtle and without a solid grasp of theoretical physics most of the jokes will go over a typical viewers head
Output: