Classification of topological phases of parafermionic chains with symmetries