The electronic configurations of Eu (Atomic no. 63), Gd (Atomic No. 64) and Tb (Atomic No. 65) are:
[Xe]4f76s2, [Xe]4f75d16s2 and [Xe]4f96s2
Penultimate and anti-penultimate shells are partially filled in f-block elements/inner transition elements as this is a more stable configuration.