Neither one souns good to me. I assume this is because there has been a traumatic event for which you have received words of consolation.
Thank you for your kind words of consolation.
Thank you for thinking of us, and for your kind words.
Thank you for your thoughts and words for us at this difficult time.
I am not a teacher.
Student or Learner