process.stdin.resume();
process.stdin.setEncoding('utf8');
// your code goes here
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
rl.on('line', function (line) {
var arr = line.split('');
for (var i = 0; i < arr.length; i++) {
var count = 0;
for (var j = 0; j < arr.length; j++) {
if (arr[i] === arr[j]) {
count++
}
}
}
if (count == 2) {
let res = arr.join('')
console.log(res)
}
});
cHJvY2Vzcy5zdGRpbi5yZXN1bWUoKTsKcHJvY2Vzcy5zdGRpbi5zZXRFbmNvZGluZygndXRmOCcpOwoKLy8geW91ciBjb2RlIGdvZXMgaGVyZQp2YXIgcmVhZGxpbmUgPSByZXF1aXJlKCdyZWFkbGluZScpOwoKdmFyIHJsID0gcmVhZGxpbmUuY3JlYXRlSW50ZXJmYWNlKHsKICBpbnB1dDogcHJvY2Vzcy5zdGRpbiwKICBvdXRwdXQ6IHByb2Nlc3Muc3Rkb3V0LAogIHRlcm1pbmFsOiBmYWxzZQp9KTsKCnJsLm9uKCdsaW5lJywgZnVuY3Rpb24gKGxpbmUpIHsKICB2YXIgYXJyID0gbGluZS5zcGxpdCgnJyk7CiAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHsKICAgIHZhciBjb3VudCA9IDA7CiAgICBmb3IgKHZhciBqID0gMDsgaiA8IGFyci5sZW5ndGg7IGorKykgewogICAgICBpZiAoYXJyW2ldID09PSBhcnJbal0pIHsKICAgICAgICBjb3VudCsrCiAgICAgIH0KICAgIH0KICAgIH0KICAgIGlmIChjb3VudCA9PSAyKSB7CiAgICAgIGxldCByZXMgPSBhcnIuam9pbignJykKICAgICAgY29uc29sZS5sb2cocmVzKQogICAgfQp9KTsK