let line;
while ((line = readline()) !== null) {
const counts = new Map();
for (const ch of line) {
counts.set(ch, (counts.get(ch) || 0) + 1);
}
let shouldPrint = false;
for (const count of counts.values()) {
if (count === 2) {
shouldPrint = true;
break;
}
}
if (shouldPrint) {
print(line);
}
}
bGV0IGxpbmU7Cgp3aGlsZSAoKGxpbmUgPSByZWFkbGluZSgpKSAhPT0gbnVsbCkgewogICAgY29uc3QgY291bnRzID0gbmV3IE1hcCgpOwoKICAgIGZvciAoY29uc3QgY2ggb2YgbGluZSkgewogICAgICAgIGNvdW50cy5zZXQoY2gsIChjb3VudHMuZ2V0KGNoKSB8fCAwKSArIDEpOwogICAgfQoKICAgIGxldCBzaG91bGRQcmludCA9IGZhbHNlOwoKICAgIGZvciAoY29uc3QgY291bnQgb2YgY291bnRzLnZhbHVlcygpKSB7CiAgICAgICAgaWYgKGNvdW50ID09PSAyKSB7CiAgICAgICAgICAgIHNob3VsZFByaW50ID0gdHJ1ZTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgfQoKICAgIGlmIChzaG91bGRQcmludCkgewogICAgICAgIHByaW50KGxpbmUpOwogICAgfQp9