class Solution:
"""
@param Matrix: the input
@return: the element which appears every row
"""
def FindElements(self, Matrix):
# write your code here
w = len(Matrix[0])
l = len(Matrix)
List =[]
for i in range(0, w):
List.append(Matrix[0][i])
for i in range(1, l):
Set = set()
for j in range(0, w):
Set.add(Matrix[i][j])
for j in range(0, len(List)):
if j < len(List) and List[j] not in Set:
List.pop(j)
return List[0]