class Solution {
public:
  
     static bool cmp(string a, string b){
       // return (a + b) < (b + a);  //表示b + a 更大就返回1,表示把b放在前面
        if((a  + b) < (b + a)) return true;
        else return false;
     }
    string minString(vector<string>& strs) {
        int n =  strs.size();
        cout<<strs[0]<<endl;
        string ans;
        sort(strs.begin(), strs.end(), cmp);
        for(int i = 0; i < n; i++){
            ans += strs[i];
        }
        return ans;
    }
};