Task is to Find out Nth Impact Player for the selected team. If Nth Player is not available then return the Last one.
Ex. - Impact Players for KKR are Southee, Suyash, Thakur, Anukul, Mandeep. For KKR 2nd Player is Suyash, but there is no 6th Player as there are only 5 Impact Players in KKR. So for n greater than 5, Nth Player for KKR will be 5th Player, i.e., Mandeep.
Also for each team there can be different no. of Impact Players and Order is as per what is given in Input Table.
We shall explore 2 Important properties of TAKE Function while solving this.