from typing import Optional


def parse_for_vote(payload: str) -> Optional[str]:
    """Parses the supplied payload string line by line, ignoring any line starting
    with ">", and checks if the line contains a +1, 0 or -1 returning the appropriate
    vote string if it does. If no, non-reply, line contains a vote then None is returned."""

    for line in payload.split("\n"):
        if ">" not in line[:10]:
            if " +1 " in line:
                return "+1"

            if " -1 " in line:
                return "-1"

            if " 0 " in line:
                return "0"

    return None