Definition: In this task, five ordered key facts are given. All the given facts are expressed in natural language. Your job is to generate a story 100 to 1000 words long, that includes all the facts given as input in their order of appearance while expanding upon them to produce a broader, yet coherent, narrative.
Input: Fact1: Jim Duncan is whipped to death in front of hotel by outlaws and Dan and Cole Carlin, Fact2: Sheriff Sam Shaw offers him job held by men, Fact3: Bridges and Carlins are about to be released from jail, Fact4: townspeople were complicit in Duncan 's murder, Fact5: Stranger takes full advantage of deal

A mysterious stranger rides out of the desert into the isolated mining town of Lago, on the shore of a small lake in an unnamed western territory. Three men follow him into the saloon, taunting him, then follow him to the barbershop. When they challenge him, he kills all three with little effort. Attractive townswoman Callie Travers deliberately bumps into him in the street, knocks his cigar from his mouth, and loudly insults him. He drags her into the livery stable and rapes her. That night, in his hotel room, the Stranger dreams of a man being brutally whipped. Then, in a flashback, Jim Duncan, a federal marshal, is whipped to death in front of the hotel by outlaws Stacey Bridges and brothers Dan and Cole Carlin as the citizens look on. Sheriff Sam Shaw approaches the Stranger and offers him the job previously held by the men he killed: defending the town from Bridges and the Carlins, who are about to be released from jail. He declines. Shaw, in desperation, offers him anything he wants in return. The Stranger learns that the townspeople were complicit in Duncans murder; they hired the outlaws to kill him after he discovered that the towns only source of income, the mine, was on government land. They then doublecrossed the murderers and turned them in. Upon learning this, the Stranger accepts the job, and takes full advantage of the deal. He appoints barbershop employee Mordecai as sheriff and mayor, and provides an Indian and his children with supplies at the shopkeepers expense. He orders the hotel owner and his guests to vacate the premises, leaving him its sole occupant. When Belding’s wife Sarah objects, he drags her, kicking and screaming, into her bedroom. The next morning, Sarah tells the Stranger that Duncan cannot rest in peace, because he is buried in an unmarked grave outside of town. The Stranger instructs the townspeople in defensive tactics, but they clearly lack the skills or courage for the job. He also orders that every building in town be painted blood red. Then, without explanation, he mounts his horse and rides out of town, pausing to replace Lago on the town sign with Hell. Meanwhile, Bridges and his gang are on their way to Lago. The Stranger harasses them with dynamite and longrange rifle fire, leaving them to ponder the identity of their attacker. Returning to Lago, the Stranger inspects the preparations—town painted red, townsmen with rifles stationed on rooftops, picnic tables laden with food and drink, and a big WELCOME banner overhead—then he remounts and departs again. The Bridges gang arrives and easily overcomes the inept resistance of the townspeople. Bridges shoots several of the civic leaders who doublecrossed them. By nightfall the town is in flames, and the terrified citizens are huddled in the saloon. A mysterious sound is heard in the street; when Cole Carlin walks outside to investigate, everyone listens in horror as he is whipped to death. Dan Carlin is found dead too, hanging from another whip. At last the Stranger reveals himself, beats Bridges to the draw, and kills him. On his way out of town the following morning, the Stranger pauses at the cemetery as Mordecai is finishing a new grave marker. I never did know your name, Mordecai says. Yes, you do, the Stranger replies. As he rides past a bewildered Mordecai into the desert, the writing on the new headstone is revealed: Marshal Jim Duncan—Rest in Peace.