#K46167. Remove Duplicate Characters
Remove Duplicate Characters
Remove Duplicate Characters
Given a string consisting of lowercase alphabetical characters, your task is to remove all duplicate characters, preserving only the first occurrence of each character.
For instance, if the input string is programming
, the expected output is progamin
because each character appears only once, in the order of their first appearance.
This problem requires that you carefully process the input string to ensure that duplicate occurrences of characters are removed, and the order of the remaining characters is maintained.
inputFormat
The input consists of a single line containing a string s (with only lowercase alphabetical characters).
outputFormat
Output the transformed string after removing all duplicate characters (keeping only the first occurrence of each character).
## sampleprogramming
progamin