def countVotes(cs, ps):
t_ps = []
for i in ps:
index = 0
for j in i:
if not t_ps:
t_ps = i
break
else:
t_ps[index] += j
index += 1
_return = []
for i in range(len(cs)):
_return.append([t_ps[i],cs[i]])
return sorted(_return,reverse=True)
print countVotes(["A", "B", "C"], [[0.5, 0.5, 0], [0.05, 0.3, 0.65]])