public String correct(String s) {
        if (!s.contains("(")) return s;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '(') {
                int fp, ep;
                if (s.substring(0, i).contains(",")) {
                    fp = s.substring(0, i).lastIndexOf(",") + 1;
                    if (s.substring(fp, i).contains("["))
                        fp = fp + s.substring(fp, i).lastIndexOf("[") + 1;
                } else if (s.substring(0, i).contains("[")) fp = s.lastIndexOf("[") + 1;
                else fp = 0;
                ep = eatExtra(s, i, '(', ')');

                Object o = eval(s.substring(fp, ep + 1));
                String t1;
                if (o instanceof String)
                    t1 = s.substring(0, fp) + "\"" + o + "\"";
                else t1 = s.substring(0, fp) + o;
                String t2 = "";
                if (ep != s.length()) t2 = s.substring(ep + 1);
                s = t1 + t2;
                i = t1.length();

            }
        }
        return s;
    }