1791. Find Center of Star Graph

class Solution:
    def findCenter(self, edges: List[List[int]]) -> int:
        for x in edges[0]:
            for y in edges[1]:
                if x == y:
                    return x