In this task, you need to replace a letter in the sentence with another given letter.
Sentence: 'a man rests his chin on his hand while lying on a bed beside a dog'. Replace the letter 'a' with 'n' in the sentence.