#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void) {
    char str[] = "(20*(5+(7*2)))+((2+8)*(3+6*9))";
    char *copy = strdup(str);
    char *delim = "*+()";
    char *res = strtok( str, delim );
    while (res) {
    	int from = res-str+strlen(res);
        res = strtok( NULL, delim );
        int to = res != NULL ? res-str : strlen(copy);
     	printf("%.*s\n", to-from, copy+from);
    }
    free(copy);
    return 0;
}