In this scenario, we know that G comes before P, P comes before E, E comes before H, and H comes before I.
This immediately fills in our 5 slots. We know that I and R come consecutively, but we do not know which comes before the other.
We can attempt to put I before R, but then we notice that there is no grade below E and that this cannot work. Only one scenario is possible, and that is where R comes before I in grade D (along with H). Because each variable is firmly placed, we know all 6 are determined.