Structure of Lanczos-Lovelock Lagrangians in critical dimensions