Spell the minor scales
Harmonic and melodic minor are natural minor with one or two notes raised — and raising a note NEVER changes its letter.
A natural minor is A B C D E F G. Harmonic minor raises the 7th, so the G becomes G♯. Still a G. The other six names do not move at all.
Melodic minor raises the 6th as well: A B C D E F♯ G♯. Same seven letters, each still used exactly once — the rule from the major and natural minor scales holds here too.
Same seven letters — raise the 7th (and the 6th)
A harmonic minor: only the G moves, to G♯. Every letter still once.
Practise this in the trainer — it opens with this lesson the first time the concept comes up.