Background: Dame Agatha Mary Clarissa Christie, Lady Mallowan,  (nee Miller; 15 September 1890 - 12 January 1976) was an English writer. She is known for her 66 detective novels and 14 short story collections, particularly those revolving around her fictional detectives Hercule Poirot and Miss Marple. Christie also wrote the world's longest-running play, a murder mystery, The Mousetrap, and six romances under the name Mary Westmacott. In 1971 she was appointed a Dame Commander of the Order of the British Empire (DBE) for her contribution to literature.
Context: Christie had long been a fan of detective novels, having enjoyed Wilkie Collins's The Woman in White and The Moonstone, as well as Sir Arthur Conan Doyle's early Sherlock Holmes stories. She wrote her own detective novel, The Mysterious Affair at Styles, featuring Hercule Poirot, a former Belgian police officer noted for his twirly large "magnificent moustaches" and egg-shaped head. Poirot had taken refuge in Britain after Germany invaded Belgium. Christie's inspiration for the character stemmed from real Belgian refugees who were living in Torquay and the Belgian soldiers whom she helped treat as a volunteer nurse in Torquay during the First World War.  Agatha began working on The Mysterious Affair at Styles in 1916, writing most of it on Dartmoor. Her original manuscript was rejected by such publishing companies as Hodder and Stoughton and Methuen. After keeping the submission for several months, John Lane at The Bodley Head offered to accept it, provided that Christie change the ending. She did so, and signed a contract which she later felt was exploitative. It was finally published in 1920.  Christie, meanwhile, settled into married life, giving birth to her only child, daughter Rosalind Margaret Hicks, in August 1919 at Ashfield, where the couple spent much of their time, having few friends in London. Archie left the Air Force at the end of the war and started working in the City financial sector at a relatively low salary, though they still employed a maid.  Christie's second novel, The Secret Adversary (1922), featured a new detective couple Tommy and Tuppence, again published by The Bodley Head. It earned her PS50. A third novel again featured Poirot, Murder on the Links (1923), as did short stories commissioned by Bruce Ingram, editor of The Sketch magazine. In order to tour the world promoting the British Empire Exhibition, the couple left their daughter Rosalind with Agatha's mother and sister. They travelled to South Africa, Australia, New Zealand, and Hawaii.  They learned to surf prone in South Africa; then, in Waikiki, they were among the first Britons to surf standing up.
Question: When was it written?

Answer:
Agatha began working on The Mysterious Affair at Styles in 1916,