Five Letter Words
You are working on a language processing system and you come across a peculiar requirement. Your system should identify words in a given text which are made up of strictly alphabetic characters and are exactly five letters long. The system should print all such words.
Given a single line of text, you are asked to write a program that would find and print all such words from it.
The output of the program should contain all the words that are strictly alphabetic and are exactly five letters long, each on a new line.
Input | Output |
The quick brown fox jumps over a lazy dog. | quick
brown
jumps |
Note: The output words should be in the order of appearance in the input.
Constraints
Time limit: 0.2 seconds
Memory limit: 512 MB
Output limit: 1 MB