The center-right and far-right parties both outperformed the Social Democrats led by Olaf Scholz, the chancellor. PAGE A8