Sick people next to you

So I have to ask…if someone is coughing and next to you do you move to an open station if there is one? Or do you suck it up.

I am currently 7 months pregnant and this person next to me in class a couple days ago was coughing and snotting. We were next to each other on the treadmill and I really wanted to move down a few to an empty one but I thought it was rude. However, thinking now- it was ruder for them to come to class. I know some people just have “allergies” though. Luckily they left halfway through the tread block.