#C1059. String Rearrangement Challenge

    ID: 39811 Type: Default 1000ms 256MiB

String Rearrangement Challenge

String Rearrangement Challenge

You are given a string that contains both letters and digits. Your task is to rearrange the string so that all letters appear before any digits, while preserving their respective ordering from the original string.

For example, given the input a1b2c3, the output should be abc123. In other words, all alphabetical characters should be listed first in the order they appear, followed by all the digit characters in the order they appear.

This problem tests your ability to manipulate strings and separate different types of characters based on their properties.

inputFormat

The input consists of a single line containing a non-empty string s composed of letters and digits.

Input Format: A single line read from standard input.

outputFormat

Output the rearranged string such that all letters appear first (in their original order) followed by all digits (also in their original order).

Output Format: A single line printed to standard output.

## sample
a1b2c3
abc123