Hacker Rank Challenge: Utopian Tree

For each test case, print the height of the Utopian Tree after n cycles. Each height must be printed on a new line.