P systems with active membranes working in polynomial space