This solution solves the question in hand. Thanks.