Per Bulbapedia:
To unlock both of Meloetta's Formes, the player must create a quiz with the keyword of RGFOAUTF (Japanese version) or TTQALFHN (English version), and complete the quiz. ... To unlock Genesect, the player must create a quiz with the keyword of QUHDPHEU (Japanese version) or PHSKUTDF (English version), and complete the quiz.
Ensure that you have the latest version of the software for these techniques to work. The language version of the game depends on the eShop region the game was downloaded from.
in pokedex 3d pro the way to get meloetta is to enter the code TTQALFHN and for genesect PHSKUTDF and their both in english