<P> The series follows a contemporary update of Sir Arthur Conan Doyle's Sherlock Holmes detective stories . Throughout the first series, it is revealed that a man named Moriarty, a "consulting criminal", was to some extent responsible for orchestrating the crimes throughout the three episodes . In the series finale, "The Great Game", Sherlock (Benedict Cumberbatch) and John Watson (Martin Freeman) come face to face with Jim Moriarty (Andrew Scott), who has snipers targeting them . Moriarty intends to have the two killed, but in the closing scenes, Sherlock aims a handgun at an explosive vest, threatening to shoot it . </P> <P> A phone call to Moriarty interrupts the standoff between him and Sherlock . Following the call, Moriarty leaves . Sherlock becomes a minor celebrity after John blogs about their activities . While investigating a case, Sherlock and John are brought before Mycroft (Mark Gatiss) in Buckingham Palace . He reveals that Irene Adler (Lara Pulver), a dominatrix known professionally as "the Woman", took compromising photographs of herself and a female member of the royal family . They want the pair to retrieve Adler's smartphone . Sherlock and John try to get into Adler's home . However Adler has been expecting them and appears to them completely naked, leaving Sherlock unable to deduce anything about her, but through a false fire alarm, he finds her hidden safe . Several CIA operatives led by Neilson (Todd Boyce) break into the house and demand that Sherlock open the safe . After realising the combination is Adler's measurements, he does so . The booby - trap in the safe distracts the agents long enough for John and Adler to disarm them while Sherlock uses the time to take the phone . Adler then sedates Sherlock, takes the phone, and escapes . </P> <P> On Christmas Eve, Sherlock learns via text that Adler has sent him her phone, which requires an unknown password, and realises she will be found dead; her mutilated body is later found and identified . A week later, on New Year's Eve, an intermediary contacts John and takes him to Battersea Power Station . John is surprised to find Adler, who faked her death to shake off her pursuers . Sherlock, having followed John, learns of Adler's survival . Sherlock returns home to find Neilson's team holding his landlady Mrs. Hudson (Una Stubbs) hostage . Sherlock saves her and throws Neilson out a window in revenge . Later on, Adler reveals that she is still being hunted and asks Sherlock to decipher a code stolen from an MOD official . He effortlessly cracks the code, revealing it to be a series of airline seat allocation numbers - Adler secretly texts the resulting flight information to Moriarty, who in turn texts Mycroft, revealing that he is now aware of the MOD ploy to fool the terrorists trying to bomb a plane . </P> <P> A government official brings Sherlock to Heathrow . He recalls the Coventry Blitz and suspects that something similar is happening . Mycroft confirms this: the US and UK governments have decided to fly an unmanned plane full of corpses so as not to alert the terrorists while avoiding casualties . However, as Sherlock unwittingly helped Adler and Moriarty crack the code, the scheme was foiled . Adler reveals a list of demands to Mycroft, including protection, in exchange for the release of the contents of her phone . Adler taunts Sherlock, saying that he meant nothing to her . However, Sherlock realises that she is intensely attracted to him, as he previously noticed her elevated pulse and her pupil dilation . He finally figures out the password and unlocks the phone with the word "SHER", so that its screen reads "I AM SHER - LOCKED". With her leverage gone, Adler pleads for protection, but Sherlock and Mycroft turn her down . </P>

How did irene adler tell sherlock the code