from typing import List
import random


def genfrags(sequence: str, number: int, size: int) -> List[str]:
    """
    Generate `number` fragments all of equal length: `size`, from `sequence`.

    Ensure that there is a fragment covering the very beginning
    and end of `sequence`.
    """
    random.seed()

    starts = (random.randint(0, len(sequence) - size) for _ in range(number))

    return [sequence[start : start + size] for start in starts] + [
        sequence[:size],
        sequence[len(sequence) - size :],
    ]