Rule reminder
Past participle agreement: when lo/la/li/le precede the verb in passato prossimo, the participle agrees. lo → -o, la → -a, li → -i, le → -e. Example: 'Me lo ha dato' → 'Me l'ha dato' (m.s.). 'Me la ha data' → 'Me l'ha data' (f.s.). With 'ne', participle agrees: 'Ne ho comprat-i/e'.
Which is correct? 'He gave it to me' (il libro — masc. sg.)