The first version of your program should: read text input

The first version of your program should:
read text input fromstdin(you may assume that input lines will be at most999characters long);
completely discard the content of all lines that commence with a period character;
replace all instances of (multiple) whitespace characters (blanks, tabs, newlines) by single blanks;
re-insert newline characters in a greedy line-by-line manner, so that each output line emitted is as long as possible, but not longer than50characters;