I thought it was four as well. P and t both do not work. P cannot be second because there would be no possible variable that works for the first spot. It cannot be g, since g must come after p, and it cannot be f or s since they must be consecutive, and it cannot be t because it comes after s.
The reason t cannot work is because that would mean s would have to come first, however f and s must be consecutive. Hope this helps!