German president urges two-state solution in Middle East