#include <iostream>
#include <unordered_set>

int main(int argc, char* argv[]){
    int num;
    std::cin >> num;
    int res;
    std::unordered_set<int> occured;
    while(num != 0){
        int cur = num % 10;
        if(!occured.count(cur)){
            occured.insert(cur);
            res = res * 10 + cur;
        }
        num /= 10;
    }
    std::cout << res << std::endl;
    return 0;
}