function deleteCode(array,deletecodes) {
    let res = [];
    return array.filter(i=>!deletecodes.includes(i)).join('');
}

let str;
while(str = readline()) {
    let countObj = {};
    let array = str.split('');
    array.forEach(i=>{
        if(countObj[i]) {
            countObj[i]++;
        } else {
            countObj[i] = 1;
        }
    })
    let min = Math.min(...Object.values(countObj));
    let deletecodes = [];
    Object.keys(countObj).forEach(key=>{
        if(countObj[key] === min) {
            deletecodes.push(key);
        }
    })
    console.log(deleteCode(array,deletecodes))
}