How do you get the mystery gift for Pokemon Diamond and Pearl?

Use an action replay