题目分析:S中先出现的T中先出现
class Solution(object):
def repeatedNTimes(self, S, T):
count = collections.Counter(T)
answer = ""
for s in S:
answer += s*count[s]
count[s] = 0
for c in count:
answer += c*count[c]
return answer