This problem is little bit complicated how did you solve this problem
========
Brook