def read_id_files(*filenames):
    """
    Read a list of files, each containing one id per line.

    Args:
        filenames: List of file names.

    Returns:
        Set of ids.
    """
    ids = set()
    for filename in filenames:
        with open(filename, "r") as fh:
            for line in fh:
                ids.add(line.strip())
    return ids