Question d’entretien chez Veeva Systems

Write a function to build tree from given string.