Tree top view problem

https://online.codingblocks.com/player/5104/content/1362?s=1135

not able to even think of how to approach these kind of tree problem? how should I proceed? and how to solve this?

This link is not opening post another link or question

This is the link given:

https://online.codingblocks.com/player/5104/content/1362?s=1135

Q.-Given a binary tree , print the nodes in left to right manner as visible from above the tree

Input Format:
Level order input