def find_explorer_location(map):
    """Returns the Location on map that contains the explorer, M.
    pre: map is the map represented as a tuple of tuples of Locations.
    post: Returns the Location containing M."""
    for i, row in enumerate(map):
        for j, loc in enumerate(row):
            if loc.get_contents() == 'M':
                return loc