Pergunta de entrevista da empresa Taboola

write a function that deserialize a tree to a string. and then serialize it back to the same tree exactly.