Construct a tree from a string format.
Use the format value(left,right), where # represents an empty child. Return the tree as a nested list [value, left, right], or None for an empty tree. Implement build_tree(data) and preserve negative and multi-digit values. The input contains no whitespace and is guaranteed to follow the format.
def build_tree(data):