const line = readline()
const LEN = line.length
const nums = []
const others = []
let arr = new Array(26).fill('')
let res = ''
for(let i = 0; i < LEN; i++){
    let codeValue = line[i].charCodeAt()
    if((codeValue >= 65 && codeValue <= 90) || (codeValue >= 97 && codeValue <= 122)){
        arr[line[i].toLowerCase().charCodeAt() - 97] += line[i] 
    }else{
        others.push(line[i])
        nums.push(i)
    }
}
others.reverse()
arr = arr.join('').split('')

for(let i = 0; i <LEN; i++){
    if(nums.includes(i)){
        res+=others.pop()
    }else{
        res+=arr.shift()
    }
}
console.log(res)