Binary tree to an s expression