How does the body sink up with other femelfemales?

How does my body know when other females have their period I alway sink up with other girls around me.