#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define F0R(i,n) FOR(i,0,n)

int main(void) {
	char str[BUFSIZ];
	printf("Enter a string: ");
	scanf("%s", str);
	bool e[26] = { false, };
	printf("String after removing duplicate characters: \"");
	F0R(i,strlen(str)) {
		if (e[str[i]-97]) continue;
		e[str[i]-97] = true;
		putchar(str[i]);
	}
	puts("\"");
}