Praise be to Allah.
If a woman has to fast for two consecutive months, and her period comes, she should stop fasting, then complete her fast, and then make up the days of her period. This is according to scholarly consensus.
Ibn Qudaamah (may Allaah have mercy on him) said: The scholars are unanimously agreed that if a woman who is fasting two consecutive months gets her period before completing that fast, she has to make up those days when she becomes pure, because menstruation is something that cannot be avoided during those two months unless that fast is delayed until the woman has passed menopause, but there is a risk that she may not be able to do the fast then.
From al-Mughni. 8/21
And Allaah knows best.