public static String groupPeopleByAge(String data) {
        String[] persons = data.split(";");
        Map<Integer, Integer> group = new TreeMap<Integer, Integer>();
        for(String person : persons){
            String[] p = person.split(":");
            String name = p[0];
            int age = Integer.valueOf(p[1]);
            if(group.containsKey(age)){
                group.put(age, group.get(age) + 1);
            }else{
                group.put(age, 1);
            }
        }
        StringBuilder sb = new StringBuilder();
        for(Map.Entry<Integer,Integer> p : group.entrySet()){
            if(sb.length() != 0){
                sb.append(";");
            }
            sb.append(p.getKey().toString()).append(":").append(p.getValue().toString());
        }
        return sb.toString();
    }