Hello friends can someone tell me how to approach this problem ??

My solution :: Approach was to make a list of all possible permutations and then check for it’s presence in the string given but it 's giving wrong answer .

@vijju123 @kaushal101 @mohit_negi @taran_1407 @vivek_1998299 @meooow @john_smith_3

Thanks in advance