You're right, they do have to be s class. I forgot to include that part.
3000000 is way too high. The materia with the highest amount of AP required to master is Knights of the Round, which takes 500000, and All is one of the fastest materias to master.





