Text this: Logics strongly capturing PTIME on classes of structures