#include <iostream>
#include <sstream>
#include <queue>
using namespace std;
string solve3(const char* str)
{
const char* p = str;
std::deque<int> dq;
std::deque<int>::iterator iTter;
while (*p) {
int value = 0;
bool value_read = false;
for ( ; *p; ++p)
{
int tmp = *p - '0';
if (tmp < 0 || tmp > 9) break;
value = value * 10 + tmp;
value_read = true;
}
if (value_read) {
dq.push_back(value);
}
if (*p == 0) break;
++p;
}
std::sort(dq.begin(), dq.end());
std::stringstream ss;
bool b = false;
for (iTter=dq.begin();iTter!=dq.end(); iTter++)
{
if (b)
{
ss << "-";
}
b = true;
ss<<*iTter;
}
// cout << ss.str() << endl;
return ss.str();
// cout << "\n\n";
}
void main(void)
{
char str[] = "a332ksfsd2&99r55rr333s";
// solve1(str);
// solve2(str);
cout << solve3(str) << endl;
}