After you click the flag go through the numbers 1-9. Don't try to go backwards because it just messes the whole thing up. If you do accidentally then just click the flag, and everything should reset.
I was inspired by everyone else who did wings of fire ships. I got the pictures from the Wings of Fire fandom site.