#include <iostream> #include <string> #include <vector> using namespace std; int main() { int i=0; int c=0; int count=0; char ch; vector <int> a; vector <int> b; while(cin>>c) { if(count==0) { a.push_back(c); } else { b.push_back(c); } if(getchar()=='\n') { count=1; } } int len1=a.size(); int len2=b.size(); int m=0; int n=0; vector <int> ans; for(i=0;i<len1+len2;i++) { if(m>=len1) { ans.push_back(b[n]); n++; } else { if(n>=len2) { ans.push_back(a[m]); m++; } else { if(a[m]>=b[n]) { ans.push_back(b[n]); n++; } else { ans.push_back(a[m]); m++; } } } cout<<ans[i]; if(i!=len1+len2-1) { cout<<','; } } return 0; }