def longest_common_prefix(x: tuple[str, ...], y: tuple[str, ...]) -> tuple[str, ...]:
    """Find the longest common prefix between two sequences."""

    i = j = 0
    while i < len(x) and j < len(y):
        if x[i] != y[j]:
            break
        i = i + 1
        j = j + 1

    return x[:i]