Find First Repeating Element Leetcode Playground Python