char * removeOuterParentheses(char * S){
int len = strlen(S),count=1,n=0;
char* ret = (char*)calloc(len,sizeof(char*));
for (int i=1; i<len; i++)
{
(S[i] == '(')? count++: count--;
if(count) ret[n++] = S[i];
else count=1,i++;
}
return ret;
}