```
class Solution:
# @param A, a list of integer
# @return an integer
def singleNumber(self, A):
map = {}
for i in range(len(A)):
map[A[i]] = map.get(A[i],0) + 1
map_sorted = sorted(map.iteritems(), key=lambda d: d[1], reverse=True)
return map_sorted[-1][0]
```