// editor2
#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main() {
    char str[105];
    fgets(str, sizeof(str), stdin);   // Read input string
    
    int len = strlen(str);
    if (str[len - 1] == '\n') {
        str[len - 1] = '\0';  // remove newline from fgets
        len--;
    }

    // Check for invalid characters (anything not letter, digit, or space)
    for (int i = 0; i < len; i++) {
        if (!(isalnum(str[i]) || str[i] == ' ')) {
            printf("Invalid input\n");
            return 0;
        }
    }

    // Remove duplicates while keeping order
    int visited[256] = {0};  // track ASCII characters
    for (int i = 0; i < len; i++) {
        unsigned char c = str[i];
        if (!visited[c]) {
            printf("%c", c);
            visited[c] = 1;
        }
    }
    printf("\n");

    return 0;