const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;

void async function () {
    // Write your code here
    while(line = await readline()){
      let map = new Map();
      for(let i = 0; i< line.length; i ++) {
        if(map.has(line[i])){
            map.set(line[i], map.get(line[i]) + 1)
        } else {
            map.set(line[i],1)
        }
      }
      const delArr = [];
      const min = Math.min(...map.values())
      map.forEach((v,k)=>{
        if(v == min) {
            delArr.push(k)
        }
      })
      const res = line.split('').filter(i => !delArr.includes(i)).join("")
      console.log(res)
    }
}()