How do you get a female riolu in Pokemon diamond?

Safe when you take the egg, when it is a man try it again