everything is fine but the order in the o/p is not as per the requirements :(