#C13016. Rearranging Letters and Digits
Rearranging Letters and Digits
Rearranging Letters and Digits
In this problem, you are given a string which may contain letters, digits, and additional special characters. Your task is to create a new string by preserving the order of the letters and digits separately. In the output, first, all the letters (in the order they appear in the input) are printed, followed by all the digits (also in the order they appear in the input). Special characters should be ignored.
For example, if the input is a1b2c3d4
, the output should be abcd1234
.
inputFormat
The input consists of a single line containing the string. The string may include letters, digits, and special characters. Only letters and digits are processed.
outputFormat
Output a single line containing the transformed string with all letters from the input (in their original order) followed by all digits (in their original order).## sample
a1b2c3d4
abcd1234