import typing


def alignment_to_fasta(alignment: typing.Dict[str, str]) -> str:
    """
    Convert alignment dict to fasta format

    Parameters
    ----------
    alignment
        dict of key: aligned sequence

    Returns
    -------
    fasta-formatted string
    """
    fasta = []
    for key, sequence in alignment.items():
        fasta.append(f">{key}\n{sequence}")
    return "\n".join(fasta)