Find First Repeating Element Leetcode Python Practice