Social hierarchy of pain and its connection to the memory of previously suffered pain