Circle Of Strings Leetcode Solutions Python