High school student Wendy Christensen visits an amusement park with her boyfriend Jason Wise, best friend Carrie Dreyer, and Carrie's boyfriend Kevin Fischer for their senior class field trip. As they board the Devil's Flight roller coaster, Wendy has a premonition that the hydraulics securing the seat belts and roller coaster cars will fail, killing everyone on board. When she panics a fight breaks out and several people leave or are forced off the ride, including Kevin; best friends Ashley Fruend and Ashlyn Halperin; alumnus Frankie Cheeks; athlete Lewis Romero; and goths Ian McKinley and Erin Ulmer. As they leave they witness the roller coaster derail, killing the remaining passengers, including Jason and Carrie, leaving Wendy devastated.The next day, Kevin tells Wendy about the explosion of Flight 180 and the subsequent deaths of the survivors. Believing that Kevin is mocking her, Wendy dismisses his theory and leaves. Later on, Ashley and Ashlyn are killed at a tanning salon when a loosened shelf falls and locks them in the overheating tanning beds. Now convinced that Death is still after them, Wendy and Kevin set out to save the remaining survivors using omens hidden within photos that were taken of them the night of the accident.Frankie dies next at a drive-thru when a runaway truck crashes into the back of Kevin's truck, causing the engine fan to blow out and slice off the back of Frankie's head. The next day, they try to save Lewis at the gym, but he tells them he doesn't believe them shortly before two iron weights from the machine he is using swing down and crush his head. Next, they find Ian and Erin working at a hardware store. Wendy manages to save Ian before he is impaled by falling planks of wood, but a chain reaction causes Erin to fall backwards onto a nail gun, and she is shot repeatedly through the head. This leaves Ian devastated, and causes him to resent Wendy.Later, Wendy learns that her sister Julie was also on the roller coaster, and rushes to the county fair to save her. She and Kevin are able to prevent Julie from being impaled on a harrow, and Wendy asks Julie who was sitting next to her on the roller coaster, as they are next on Death's list. Her question is answered when Julie's friend Perry Malinowski is suddenly impaled by a flagpole that is launched by a rope tied to a horse. Wendy saves Kevin from an exploding propane canister caused by all the commotion and is confronted by a deranged Ian, who blames her for Erin's death. A set of fireworks go off in their direction and nearly hit Wendy, but she ducks and they strike a nearby cherry picker instead. As Ian shouts that Death cannot kill him, the cherry picker collapses and crushes him. Wendy believes the cherry picker was meant for her, but Ian inadvertently took her place.Five months later, Wendy is on a subway train with her roommate Laura and friend Sean. After seeing more omens Wendy attempts to leave the train, but she encounters Julie as she enters the carriage and decides to stay. Wendy then notices Kevin sitting at the back end of the carriage. Suddenly the train derails and everyone on board dies: Julie is hit by a stray wheel; Kevin is ground between the train and tunnel wall; and Wendy survives the crash but is hit by another train. This turns out to be another premonition and the three attempt to stop the train. The screen then cuts to black, followed by the sound of screeching metal.
Output: Question: who was sitting at the back end of the carriage?, Answer: Kevin