Similar Items: Capturing the polynomial hierarchy by second-order revised Krom logic