#K9616. Unique Characters Extraction
Unique Characters Extraction
Unique Characters Extraction
You are given a string S consisting of alphabets (both uppercase and lowercase) and digits. Your task is to remove all duplicate characters from S while preserving the order of their first occurrence.
In other words, if a character appears more than once, only its first occurrence should be kept in the resulting string, and all subsequent duplicates must be removed.
For example, given \( S = \texttt{programming12331} \), the output should be \( \texttt{progamin123} \).
inputFormat
The input consists of a single line containing the string \( S \). The string may include both letters and digits.
outputFormat
Output a single line representing the modified string with duplicate characters removed while preserving the order.
## sampleprogramming12331
progamin123