Chapter 12: Kahuna Hapu
Exit this room to the south to meetup with Lillie. Gladion will give you the Sun Flute (Moon version), or the Moon Flute (Sun version). You'll also get the Master Ball. Head south and take the elevator to the dock on B1F. Head left and speak to Gladion, tell him you're ready to go. You'll arrive at Seafolk Village on Poni Island.
Head north a little bit and you'll meet the chief of Seafolk, he'll tell you to find Hapu's house. Head north into Poni Wilds. Head left and grab the Max Repel and the Zygarde Cell on the beach. Head north of the beach to find two more trainers, some berries, and a Rare Candy. Head back south and explore the central area to defeat a trainer and find some more berries under a tree. Head to the right of the berries for a Max Potion. Right of this there's another slope with more berries and you can head a little to the left on a slope for a Zygarde Cell. Head south and defeat another trainer before leaving the area to the right.
Ancient Poni Path
A cutscene will play upon entering Ancient Poni Path. Hapu's grandmother will register Machamp to your Ride Pager. Grab the Zygarde Cell by the wall to the north. Go through the tall grass below you for an Adrenaline Orb in an Item Ball. Head back up to the right side of the house and grab another Zygarde Cell. From here you'll see a Shiny Stone in an Item Ball that you can wrap around and grab. Head to the right and south to follow after Hapu. You'll battle another trainer here. Head left and north into the tall grass to grab TM79 - Frost Breath. Enter right into the Ruins of Hope.
Ruins of Hope
Pick up the Zygarde Cell here, and then speak with Lillie. Enter through the door. Use Machamp to push the stone closeset to you all the way forward, then push the stone in the middle to the right. Go around and push it into the hole in the ground. Enter to the north. A cutsene will reveal Hapu as the Kahuna of Poni. Exit the Ruins and fly back to Seafolk Village and a cutscene will immediately start. Heal up if you need, and then head south and to the left. You'll then set off to Exeggutor Island.
As soon as you get on the island, you'll face off against an Alolan Exeggutor. Head north to Lillie for some more dialogue as it begins to rain. Head to the right side of the spiral to find a Prism Scale. Head up the sprial to gain elevation and investigate the bush here for a Heart Scale. Speak with Lillie and you'll take the Moon Flute (Moon version) or the Sun Flute (Sun version). You'll then take the S.S. Magikarp back to Poni Island. Head right towards Ancient Poni Path. Once here, head north where you'll find Lillie and a slew of Team Skull grunts. You'll have to battle two grunts (6 total Pokemon) and then Plumeria will show up for a cutscene. She'll give you Poisonium Z.
Island Kahuna Hapu
Head north and speak to Hapu. She'll challenge you to a battle. This is your Grand Trial. She specializes in Ground type Pokemon and has a Lv. 47 Dugtrio, a Lv. 47 Flygon, a Lv. 48 Mudsdale, and a Lv. 47 Gastrodon. A strong Ice and Grass type will work well for you. When you win, she'll give you the Groundium Z. Your Grand Trial will be complete.