static HashSet<ArrayList<String>> plusK(HashSet<ArrayList<String>> left, HashSet<ArrayList<String>> right, int k){
        HashSet<ArrayList<String>> res = new HashSet<ArrayList<String>>();
        for(ArrayList<String> l : left){
            for(ArrayList<String> r : right){
                ArrayList<String> union = new ArrayList<String>();
                union.addAll(l);
                union.addAll(r);
                ArrayList<String> unionk = new ArrayList<String>();
                /*
                for(int i=0;(i<k)&&(i<union.size());i++){ 
                    unionk.add(union.get(i));
                }
                res.add(unionk);
                */
                int j=0;
                for(int i=0;i<union.size();i++){
                    if(j>=k) break;
                    if(union.get(i).equals(Grammar.epsilon) && (i+1)<union.size()) continue;
                    unionk.add(union.get(i));
                    j++;
                }
                res.add(unionk);
                
            }
        }
        return res;
    }