Deriving three-outcome permutationally invariant bell inequalities