@sumit_agarwal I would urge you to consider a few examples yourself and try and work out first along the lines of above logic. Do it by standard approach first. It would help you develop a more generic intellect towards non-standardised questions like these. Feel free to comment again if it doesn't work out. Will try and provide a solution for your query then.
NMIMS, Mumbai (Marketing)