def get_aligned_sequences(mafft_output):
    """
    Parse aligned FASTA sequences from MAFFT output.
    :param mafft_output: MAFFT program output in FASTA format
    :return: Array of the aligned sequences in FASTA format
    """
    # mafft_lines = Array of FASTA lines

    mafft_lines = mafft_output.splitlines()
    headers = [line for line in mafft_lines if line.startswith(">")]
    sequences = ["".join(sequence.split("\n")[1:]) for sequence in mafft_output.split(">") if sequence]

    sequence_part = [i + "\n" + j + "\n" for i, j in zip(headers, sequences)]

    return sequence_part