They say that only unique letters should be printed out. And that lower and upper case letters are treated as the same thing. However... In the conditions file, they give two example inputs and outputs. If the input text is "zBk yaz b-kN", then they say the output should be "abkny". However b and k appear twice in the input and are not unique. If the input text is "caAC\nA, aB? bB", then they say the output should be "abc". However all of those letters appear more than once in the input, and the input in fact has no unique letters. So what do they actually mean by unique letters here? Based on the requirement for unique letters, it seems like the correct output for the first one should be "any" and the correct output for the second one should be an empty string. EDIT: After sleeping on it, I think I see what they are looking for. It could be worded better. It's not that the letter must be unique in the source; it just needs to be mentioned only once in the output. That's actually much easier than what I wrote, since TreeMap can only have one copy of each element it holds.