Problem #PRU-66634

Problems Mathematical logic

Problem

Frodo can meet either Sam, or Pippin, or Merry in the fog. One day everyone came out to meet Frodo, but the fog was thick, and Frodo could not see where everyone was, so he asked each of his friends to introduce themselves.
The one who from Frodo’s perspective was on the left, said: "Merry is next to me."
The one on Frodo’s right said: "The person who just spoke is Pippin."
Finally, the one in the center announced, "On my left is Sam."
Identify who stood where, knowing that Sam always lies, Pippin sometimes lies, and Merry never lies?