If you made the rankings in the 2017 International Challenge May Online Competition, you can now claim your participation prize—a special code that can be redeemed for Tyranitarite, Abomasite and Manectite Mega Stones now through June 30, 2017, at 23:59 UTC.
Just log in to the Pokémon Global Link (PGL) using the game that you used to participate in the 2017 International Challenge May and click here. To redeem the code in your game, select Mystery Gift from the main menu, then select Receive Gift, and then select Get with Code/Password and follow the prompts to enter your special code. Be sure to enter the code in your copy of Pokémon Sun or Pokémon Moon before June 30, 2017, at 23:59 UTC.
Visit the Online Competitions page for 2017 International Challenge May Trainer and Pokémon rankings.
Source: Pokémon Global Link