Below is what I have in my table.
++++++++++++++++++++ Parent + Child ++++++++++++++++++++ C1 + G1 C1 + G2 C1 +
MySQL and RDBMS's in general are not great at this sort of structure. You'll probably have to use client-side recursion to do this.
If the recursion is limited to just three deep, like your example, you can do it with joins, but it's not very scalable for deeper trees.