import java.util.*;

public class Solution {
    public String PrintMinNumber(int [] numbers) {
        if(numbers == null || numbers.length == 0){
            return "";
        }
        String[] ss = new String[numbers.length];

        for(int i = 0; i < numbers.length; ++i){
            ss[i] = String.valueOf(numbers[i]);
        }

        Arrays.sort(ss, new Comparator<String>(){
            // 多元素排序问题-->2个元素排序问题-->(str1+str2).compareTo(str2+str1);
            public int compare(String s1, String s2){
                String str1 = s1 + s2;
                String str2 = s2 + s1;
                return str1.compareTo(str2);
            }
        });
        StringBuilder sb = new StringBuilder();
        for(String s : ss){
            sb.append(s);
        }
        return sb.toString();
    }
}