#include <stdio.h>
#include <string.h>
#include <ctype.h> // Include ctype.h for isalnum function
 
#define MAX_LENGTH 100
 
void removeRepeatedCharacters(char *str) {
    int charCount[256] = {0}; // To count occurrences of each character
    char result[MAX_LENGTH];
    int j = 0;
 
    for (int i = 0; str[i] != '\0'; i++) {
        charCount[(unsigned char)str[i]]++;
    }
 
    for (int i = 0; str[i] != '\0'; i++) {
        if (charCount[(unsigned char)str[i]] == 1) {
            result[j++] = str[i];
        }
    }
 
    result[j] = '\0'; // Null-terminate the result string
    strcpy(str, result); // Copy the result back to the original string
}
 
int main() {
    char input[MAX_LENGTH];
 
    // printf("Enter a string: ");
    fgets(input, sizeof(input), stdin);
    
    input[strcspn(input, "\n")] = 0; // Remove the newline character
 
    for (int i = 0; input[i] != '\0'; i++) {
        if (!isalnum(input[i]) && input[i] != ' ') {
            printf("Invalid input\n");
            exit(0);
        }
    }
 
    removeRepeatedCharacters(input);
 
    printf("%s\n", input);
    return 0;
}