Pergunta de entrevista da empresa Microsoft

Write the code to spirally print a tree.