Solution can be seen in the branches