#C14905. Unique Characters
Unique Characters
Unique Characters
In this problem, you are given a string (s) and you need to remove duplicate characters, keeping only the first occurrence of each character. The order of characters in the output should be the same as their order of first appearance in the input string. For example, given the input string "programming", the output should be "progamin". The input and output are handled via standard input and output respectively.
Note: If the input string is empty, output an empty string.
inputFormat
The input consists of a single line containing the string (s). The string can contain any printable characters.
outputFormat
Output a single line containing the unique characters from (s), preserving the order of their first occurrence.## sample
programming
progamin