Let me explain things with the help of an example:-