def merge(reference: str, target: str) -> str:
    """
    Merge an alignment into a single sequence.
    For example:
    >>> merge("ATTGC---", "--TGCTTG")
    'ATTGCTTG'
    """
    return "".join([tgt if ref == "-" else ref for ref, tgt in zip(reference, target)])