#C12154. Separate Alphabets and Digits

    ID: 41550 Type: Default 1000ms 256MiB

Separate Alphabets and Digits

Separate Alphabets and Digits

You are given a string that consists of alphabets and digits. Your task is to separate the alphabets from the digits and output two strings: the first containing all alphabets in the order they appear in the input, and the second containing all digits in the order they appear.

For example, given the input string a1b2c3d4, the output should be abcd on the first line and 1234 on the second line.

The solution needs to read input from standard input (stdin) and write the result to standard output (stdout).

inputFormat

A single line containing a string composed of alphabets and digits. The input is provided via standard input (stdin).

outputFormat

The output consists of two lines. The first line should display all the alphabets extracted from the input (in the same order as they appear), and the second line should display all the digits extracted from the input (in the same order).## sample

a1b2c3d4
abcd

1234

</p>