from collections import defaultdict
def solution(survey, choices):
indicators = (('R', 'T'), ('C', 'F'), ('J', 'M'), ('A', 'N'))
scores = defaultdict(int)
type = []
for s, c in zip(survey, choices):
score = c - 4
scores[s[0]] -= score
scores[s[1]] += score
for i in indicators:
if scores[i[1]] > scores[i[0]]:
type.append(i[1])
continue
type.append(i[0])
return "".join(type)