lst=[1,2,2,3,3,3,4,3,3,3,2,2,1]
while len(lst)>0:
if lst.count(lst[0])%2 != 0:
print (lst[0])
break
else:
lst = list(filter(lambda x: x != lst[0], lst))
lst = [i for i in lst if i != lst[0]]
if len(lst)%2 ==0:
print('Такого элемента нет!')