Question 1
Write a program that, given a string s as input, prints the string obtained by removing all duplicate characters from s (that is, retain only the first occurrence of each character). The characters should appear in the output in the same order as they appear in s.
Note: str.charAt(arg) returns the character present at index arg in the string str.
Sample input 1: eerie, output: eri
Sample input 2: abcd, output: abcd