import re


def read_access_log(location: str) -> set:
    """
    reads the access log and searches for ip adresses

    :param location: str, apache2 log filepath
    :return: set, ip adresses
    """
    ip_pattern = re.compile(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}")
    with open(location) as file:
        ips = set()
        for line in file:
            match = ip_pattern.findall(line)
            if match:
                ips.update(match)
        return ips