def make_lilypond_template(tonic: str, scale_type: str) -> str:
    """
    Make template of Lilypond text file.

    :param tonic:
        tonic pitch class represented by letter (like C or A#)
    :param scale_type:
        type of scale (e.g., 'major', 'natural_minor', or 'harmonic_minor')
    :return:
        template
    """
    raw_template = (
        "\\version \"2.18.2\"\n"
        "\\layout {{{{\n"
        "    indent = #0\n"
        "}}}}\n"
        "\\new StaffGroup <<\n"
        "    \\new Staff <<\n"
        "        \\clef treble\n"
        "        \\time 4/4\n"
        "        \\key {} \\{}\n"
        "        {{{{{{}}}}}}\n"
        "        \\\\\n"
        "        {{{{{{}}}}}}\n"
        "    >>\n"
        ">>"
    )
    tonic = tonic.replace('#', 'is').replace('b', 'es').lower()
    scale_type = scale_type.split('_')[-1]
    template = raw_template.format(tonic, scale_type)
    return template