Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I think the problem is not so much the test cases but the order in which the set() arranges all the letters. Because there are times in which only 1 iteration through the triplets won't be enough to rearrange properly the letters in r. This is because of the nature of the random sorting of the set() module. If it runs twice as azzbcc says it works, but maybe it's overdoing it.
having said that, it's a wonderful solution...