from typing import Iterator
from typing import Sequence


def head_reader(
        rows: Iterator[Sequence[str]]
    ) -> Iterator[Sequence[str]]:
    """Consumes three header rows and returns the iterator."""
    r0 = next(rows)
    r1 = next(rows)
    r2 = next(rows)
    assert set(r2) == {"x", "y"}, set(r2)
    return rows