def is_task_tagged(task, tags, filters):
    """
    Determine if given task match tag query.

    :param task: Task to check.
    :param tags: List of tags that should belong to the task.
    :param filters: List of tags that should not belong to the task.
    :return: True if task matches the query.
    """
    if all(tag in task.tags for tag in tags):
        if not filters or not any(tag in task.tags for tag in filters):
            return True

    return False