# https://www.codewars.com/kata/identifying-top-users-and-their-corresponding-purchases-on-a-website/train/python
# Execution Timed Out (12000 ms)
from collections import Counter
def id_best_users(*args):
best_users = {}
every_month_users = set.intersection(*(set(arg) for arg in args))
c = Counter([a for arg in args for a in arg if a in every_month_users])
for k, v in c.items():
best_users.setdefault(v, []).append(k)
return sorted([[k, sorted(v)]
for k, v in best_users.items()], reverse=True)