Problem Sheokand and String

Help me out with the test case for which the below mentioned code fails

https://www.codechef.com/viewsolution/18830461

This problem is from JUNE 18 Division 2 Sheokand and String

Here is the test case you want

2
bcd
abc
2
2 cde
2 xyz

#moreover I think problem is that "max_equality_no " can be zero also

here outputs will be

abc

abc

because if nothing matches then you need to output lexo. smallest string…

#HERE is your accepted solution :slight_smile: