#K65312. Separate Characters
Separate Characters
Separate Characters
Given a string s
, your task is to separate it into three parts:
- Lowercase letters: All lowercase alphabetic characters in the order they appear.
- Digits: All numeric characters in the order they appear.
- Special characters: All characters that are neither lowercase letters nor digits, in the order they appear.
If a category has no characters, output an empty line for that category.
Note: The program should read the input from standard input (stdin) and write the output to standard output (stdout).
inputFormat
The input consists of a single string s
which may contain lowercase letters, digits, and special characters. The string is provided via standard input.
outputFormat
The output should contain three lines:
- The first line should contain all lowercase letters extracted from the input.
- The second line should contain all digit characters extracted from the input.
- The third line should contain all special characters extracted from the input.
If a particular category has no characters, print an empty line for that category.
## samplea1b2c3!@#
abc
123
!@#
</p>