Solution to the above puzzle can be found here