private HashMap<String,HashSet<ArrayList<String>>> copyTable(HashMap<String,HashSet<ArrayList<String>>> m){
        HashMap<String,HashSet<ArrayList<String>>> res = new HashMap<String,HashSet<ArrayList<String>>>();
        Set<String> keySet = m.keySet();
        for(String key:keySet){
            String new_key = new String(key);
            HashSet<ArrayList<String>> set = m.get(key);
            HashSet<ArrayList<String>> new_set = new HashSet<ArrayList<String>>();
            for(ArrayList<String> array : set){
                 ArrayList<String> new_array = new ArrayList<String>();
                 for(String string : array){
                     String new_string = new String(string);
                     new_array.add(new_string);
                 }
                 new_set.add(new_array);
            }
            res.put(new_key, new_set);
        }
        return res;
    }