For trainers who have gotten to the end of Pokemon Sun and/or Moon, you've probably noticed that acquiring Mega Stones is not nearly as direct as it was. While you can get a few from the Battle Tree, it's immediately apparent that not every single stone is available in the game. Nintendo is getting around this by offering a download code to all trainers so that they can grab the missing Mega Stones.
The code is AZUL.
To redeem the code, make your way over to the Mystery Gift panel from the Main Menu. From there, hit Receive Gift, then Get with Code/Password, then Yes, and then Yes again to connect to the Internet. Enter the Code and then go into the game and speak to a deliveryman in a Pokemon Center to receive the stones and voila. Your battle tactics just got that much more in-depth. Don't forget to save once you speak to the deliveryman.
Pidgeot, Steelix, Heracross, and Houndoom are not found in the wild of the Alola region, so in order to bring them into the game, you'll have to use Pokemon Bank and transfer from a copy of Pokemon X/Y or Omega Ruby/Alpha Sapphire.
Source: [Pokemon]