Leetcode 2103 Rings and Rods