Help with GRANAMA

CodeChef: Practical coding for everyone I can’t seem to find the mistake in my solution for granama.Please help

This

Input
1
abcz abcc
Your output
NO
Expected Output
YES

Chef will correctly classify them as non granama due to presence of z in one of them.

Look at my solution

It’s very simple CodeChef: Practical coding for everyone

Just print “no” if the 2 strings are not equal and set of strings is also not equal else print “yes”