First you need to solve Dawn's riddle and find the Blue Card Key from Johanna's room.
ditto doesn't want to come out of the poke ball
code missingno