import collections
import json
import sys


data = json.loads(sys.stdin.read())

frequencies = collections.Counter(exam['location'] for exam in data['exams'])
result = sorted(location for location, frequency in frequencies.items() if frequency > data['room_capacities'][location])

print("\n".join(str(x) for x in result))

955581f46f10f7e5703cf8123bc11d9f2eece888
<mask token>

<mask token>
print('\n'.join(str(x) for x in result))

<mask token>
data = json.loads(sys.stdin.read())
frequencies = collections.Counter(exam['location'] for exam in data['exams'])
result = sorted(location for location, frequency in frequencies.items() if 
    frequency > data['room_capacities'][location])
print('\n'.join(str(x) for x in result))

import collections
import json
import sys
data = json.loads(sys.stdin.read())
frequencies = collections.Counter(exam['location'] for exam in data['exams'])
result = sorted(location for location, frequency in frequencies.items() if 
    frequency > data['room_capacities'][location])
print('\n'.join(str(x) for x in result))

import collections
import json
import sys


data = json.loads(sys.stdin.read())

frequencies = collections.Counter(exam['location'] for exam in data['exams'])
result = sorted(location for location, frequency in frequencies.items() if frequency > data['room_capacities'][location])

print("\n".join(str(x) for x in result))
