#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main() {
    char str[101], result[101];
    int seen[256] = {0}; // Track visited characters
    int k = 0;

    // Read whole line including spaces
    if (!fgets(str, sizeof(str), stdin)) {
        printf("Invalid Input");
        return 0;
    }

    // Remove newline if present
    str[strcspn(str, "\n")] = '\0';

    int n = strlen(str);

    // Constraint check
    if (n < 1 || n > 100) {
        printf("Invalid Input");
        return 0;
    }

    // Process string
    for (int i = 0; i < n; i++) {
        char c = str[i];

        // Allow only letters, digits, and spaces
        if (!(isalpha(c) || isdigit(c) || c == ' ')) {
            printf("Invalid Input");
            return 0;
        }

        // If character not seen yet, add to result
        if (!seen[(unsigned char)c]) {
            result[k++] = c;
            seen[(unsigned char)c] = 1;
        }
    }

    result[k] = '\0';
    printf("%s", result);

    return 0;
}