#C12214. Rearrange String

    ID: 41617 Type: Default 1000ms 256MiB

Rearrange String

Rearrange String

Given a string s, rearrange its characters so that all alphabetic characters are moved to the beginning, preserving their original order, followed by all digit characters, also preserving their order. Any other character (such as punctuation or spaces) should be removed.

For example, if \(s = "a1b2c3!!"\), then the output should be "abc123".

This problem tests your ability to process strings and manage character filtering and ordering in a simple yet efficient way.

inputFormat

A single line containing a string composed of alphabets, digits, and possibly other characters.

outputFormat

Output the transformed string where all alphabetic characters are moved to the front (in their original order) followed by all digits (in their original order).## sample

a1b2c3!!
abc123