Task: Sentence Ordering
Input (English): Sentence1: He worked in a factory. Sentence2: As a result, he had to find other work. Sentence3: John was a troubled worker. Sentence4: The factory fired him for poor work. Sentence5: There once was a man named John.
Output (English): 24531