this is my solution to problem 
https://www.hackerrank.com/challenges/fractal-trees

Mauro