Capturing the polynomial hierarchy by second-order revised Krom logic (Logical Methods in Computer Science, 2023)