while True:
    try:
        s = input()
        already, lst, dic = [], [], {}
        # 连接相同的字母(忽略大小写),将其添加到lst中,如['Bb', 'aA']
        # 同时用dic记录非字母字符的位置
        for i in range(len(s)):
            if not s[i].isalpha():
                dic[i] = s[i]
                continue
            if s[i].lower() not in already:
                already.append(s[i].lower())
                temp = s[i]
                for j in range(i+1, len(s)):
                    if s[i].lower() == s[j].lower():
                        temp += s[j]
                lst.append(temp)
        # 对lst进行冒泡排序
        for i in range(len(lst)-1):
            for j in range(i+1, len(lst)):
                if lst[i].lower() > lst[j].lower():
                    lst[i], lst[j] = lst[j], lst[i]
        # 将非字母字符插入到原来位置
        lst = list(''.join(lst))
        for i in dic.keys():
            lst.insert(i, dic[i])
        print(''.join(lst))
    except:
        break