const readline = require("readline");

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
});
let arr=[],count=1
rl.on("line", function (line) {
    if(count%2===0){
        arr.push(...line.split(' ').map(Number))
    }
    count++
}).on('close',()=>{
    arr.sort((a,b)=>a-b)
    arr=Array.from(new Set(arr))
    console.log(arr.join(''))
})