class Library(object):

    def documentAccess(self, records, userGroups, roomRights):
        documents = set()
        for record in records:
            document, room, group = record.split()
            if room in roomRights and group in userGroups:
                documents.add(document)
        return len(documents)

e4a44a13b7a141c129c3313e26478d071fec196c
<mask token>

class Library(object):
    <mask token>

class Library(object):

    def documentAccess(self, records, userGroups, roomRights):
        documents = set()
        for record in records:
            document, room, group = record.split()
            if room in roomRights and group in userGroups:
                documents.add(document)
        return len(documents)
