The logic is very simple.
#1 Not to use the same finger twice in a row.
#2 No awkward finger crossings (e.g. play 1st string with 'i' after playing 2nd string with 'm' or 'a')
Assuming you end bar 8 with 'm', bars 9 - 11 could for example go (using that same logic):
i,m,i,m,a | m,i,m,i | a,m,i,m,i
Fast mam or ama combinations are something I generally want to avoid because I find them difficult, so I probably rather would make some exceptions to rule #2 instead. It is generally easier for the hand to play 'a' instead of 'm' when going to a lower string (in pitch) from 'i', so I could play those bars:
i,m,i,a,m | i,a,i,m | a,m,i,m,i
I also find ami more comfortable than ima...
I think it's important that you incorporate the use of 'a' finger in scale type passages, and that's the instructional purpose of the piece in the lesson in my opinion / guess. Otherwise the exact fingering you use isn't that important.
Alhambra 4P spruce
Almansa 457 cedar
Cordoba C12 spruce