How LLMs Can Find a Needle in a Haystack