Stupid school policies

my school has this new rule where you can only go to the bathroom 2 times per class and it lasts the whole quarter. I don’t think they were actually thinking about girls in this situation. and i don’t wanna have to wait till lunch to change because i have lunch b and heavy bleeding so i can’t wait that long. what should i do?