The interior of a sports hall somewhere in London, later on the same day. It has the appearance of a perfectly ordinary sports centre, purpose-built and brightly lit, neither expensive nor exclusive nor special in any other way. The only unusual feature of the hall is that it is divided into separate sections by long but narrow strips of blue rubber flooring, about sixteen by two yards in size.

On the foremost of these strips, two men are engaged in a fierce fencing bout. They're of about equal height, but the full protective gear they're wearing - white jackets and breeches, gloves and black masks - render them completely unrecognisable. They're moving back and forth at an impressive speed. The blades of the sabres they're wielding are no more than a blur as they launch their attacks, parry, and counter-attack. Since the hall is empty except for them, the only sounds to be heard are the clash of steel on steel, the rustle of their trainered feet flitting back and forth on the strip, and their heavy breathing behind the wire-netting of their masks. It's clearly just a practice match - there is no referee present, and the electronic scoring board installed above the strip is switched off - but both opponents seem deadly serious about asking no quarter, and giving none either.

After a while, however, it becomes obvious that the opponents are not evenly matched. The man on the left is clearly faster, more agile, and seems to score at least twice as many hits as the man on the right. As the bout progresses, the man on the right finds himself forced more and more onto the defensive. He parries the lunges aimed at him more slowly and less effectively by the minute, and his counter-attacks, though still accurate in technical execution, become rather half-hearted. His opponent mercilessly takes advantage, springing forward suddenly in a particularly vigorous attack. Their blades clash again, and then one of the weapons is spinning through the air and lands on the floor with a resounding clatter. The man on the right, taken completely by surprise, stumbles backwards, disarmed and defeated, loses his balance, and sits down heavily on his backside.

In the silence that follows the sudden end of the bout, the man who is still standing lowers his own weapon, switches it to his left hand, and extends his right to help his fallen opponent back up. The offer is gratefully accepted. The defeated fencer scrambles back to his feet, then yanks off his heavy mask, revealing the brightly flushed, sweaty face and tousled sparse hair of none other than Mycroft Holmes.

MYCROFT (breathlessly): All right. Enough for today.

His opponent removes his mask as well, but with less undignified haste. Then he raises his weapon in an ironic fencer's salute, looking extraordinarily pleased with himself - as pleased as only Sherlock Holmes can look when he's got one up on his older brother.

SHERLOCK (in a mock-disappointed tone): Already?

Mycroft smiles grimly in return, retrieves his own weapon, and walks over to fall rather than sit down on one of the low benches ranged along the wall. He peels off his gloves, loosens the high collar of his jacket, picks up one of the two gym bottles that have been placed on the bench, and drains it almost in one go. His brother joins him, stretching out his long legs comfortably as he settles down. Up close, Sherlock is not as desperately exhausted as Mycroft, but he's certainly worked up a sweat, too. He takes off his gloves as well, and brushes his damp hair off his forehead with the back of his hand.

MYCROFT (disapprovingly): You're enjoying this far too much.

SHERLOCK: Stop giving me reasons.

Mycroft's expression doesn't soften.

MYCROFT: I appreciate your concern for my personal safety, brother dear. But of the many people who have a reason to wish to see me physically eliminated, how many do you think are going to challenge me to an actual duel in order to achieve that end?

Sherlock picks up the other water bottle and takes a swig.

SHERLOCK (earnestly): What's the point of carrying a fancy sword stick, if all you can do with it is nick your own thumb? You cut a pitiful figure that night, Mycroft. You'd better do something about it before word gets around just how easy you'd be to kill.

MYCROFT (sarcastically): And the best way to keep that secret is polishing me off in public twice a week? (He gestures around the hall.) Anyone could get in here. Anyone could watch. Or worse.

SHERLOCK: We've been over this, haven't we? Exclusive establishments attract attention. Private instructors gossip. The safest place to hide is in the middle of a crowd, Mycroft. Who would ever expect you in a place like this? Besides, the lady and gentleman currently comprising your personal security detail are really enjoying their two hours off every Thursday.

MYCROFT (with a sour look at his brother): I know. I can't say I approve.

SHERLOCK (with a wry curl of his lip): Can't blame them for wanting to get some exercise, too.

With a loud click, the door into the hall opens. A group of teenagers appears, also in fencing gear, carrying their masks and accompanied by an instructor. As their chatter fills the hall, the Holmes brothers exchange a look, gather up their equipment, and get ready to leave.

MYCROFT (tucking his mask under his arm): I'd offer you a lift back into town, but I've got a plane to catch, and a long day of tedious negotiations ahead of me.

He looks rather harassed at the prospect. Sherlock pushes the door out of the hall open with a flourish.

SHERLOCK (maliciously): Well, enjoy Brussels!

MYCROFT (walking past him out of the door, under his breath): I'd rather have a whole week of this.

Sherlock doesn't make even a token effort to conceal a broad grin. Mycroft lifts his chin, sniffs defiantly, and walks on with determined steps towards the changing rooms.

MYCROFT (over his shoulder): And I didn't just say that!


221B Baker Street. The kitchen, on the next morning - Friday. Sherlock, already dressed as pristinely as ever, is seated at the kitchen table, peering intently into his microscope. As usual, the table is littered with scientific paraphernalia - glassware in various stages of cleanliness, tweezers, boxes of gloves, and a Bunsen burner rising out of the mess like a candelabra on a surrealistic dining table. Next to the microscope, Sherlock has set up his laptop, an open browser window displaying rows of thumbnail photographs of what look like wood samples.

There's a knock on the open sitting room door, and a moment later, John Watson pokes his head into the kitchen. He's in his black jacket over a light grey shirt and brown cardigan, and carries a briefcase. He's clearly on his way to work.

JOHN: Morning. Is that a thing now? Dancing men all over the place?

He gestures over his shoulder. In the sitting room, in front of the fireplace between their two armchairs, Sherlock has placed a solid wooden easel with a blackboard on it. The board is adorned with two rows of dancing stick figures, very similar to those they saw on Shinwell Johnson's garage behind The Warren the day before. Propped up in front of the men is a printout of the photo Sherlock took of the original sample.

SHERLOCK (without looking up from the microscope): I see Rosie's starting to settle in nicely at the nursery.

JOHN: Yeah, she's - (Surprised) Hang on -

SHERLOCK (his eyes still on his sample): She let you say bye-bye a full twenty-three minutes earlier than yesterday.

JOHN (automatically checking his watch): Right, yeah. She's discovered the rocking horse. I'll probably have trouble luring her away from it when I go pick her up. (He jerks his head at the dancing men on the blackboard.) So, twenty-three extra minutes – care to bring me up to date?

SHERLOCK (leaning back from his microscope): What? Oh, the code.

JOHN: Is it a code then?

SHERLOCK: Almost certainly.

He abandons his microscopy, and walks over into the sitting room. John, happy to accept the unspoken invitation, drops his bag onto the floor by his armchair and settles down in it. Then he reaches out and picks up the photo, studying it with his brows drawn together.

JOHN: So you think the dancing men have something to do with Mrs Warren's weird lodger?

SHERLOCK: Oh yes. He put them there.

JOHN: He – what? I thought he never leaves his room?

SHERLOCK: He barely ever entered that room, John. He's certainly not in it now.

John blinks in surprise. Sherlock, who has remained standing, starts pacing up and down in the space between the kitchen door and the desk between the windows, and launches into a lecture.

SHERLOCK: From our interview with Mrs Warren alone, it was already a foregone conclusion that the person whom the other people in the house can hear moving about in that room now is not the same person who rented the room in the first place. What we found when we went to see The Warren for ourselves merely confirmed it.

JOHN: What?

SHERLOCK: Mrs Warren may not be the most charming client we've ever had the fortune to act for, John, but there's nothing wrong with her eyes and ears. There's no other explanation for what she saw and heard. Unbeknownst to the landlady, there has been a substitution of lodgers. (He halts, and then abruptly sits down in his own chair opposite John.) Do you remember how she described this man André's appearance?

JOHN (thoughtfully): Young, she said, but big and heavy - (He slaps his head to his forehead.) Ah, I see it now. That's what you meant by "weight loss", yesterday. If he "stomped" up the stairs on the night he moved in -

SHERLOCK (with an appreciative smile): Exactly. Then he's highly unlikely to be the same person who's "flitting" around above their heads now. "Like a human mouse", as Mrs W called it so aptly.

JOHN (sceptically): Some big men are surprisingly agile. Maybe he just rumbled up the stairs like that because he was weighed down with luggage.

SHERLOCK (smiling still more broadly): You surpass yourself, John. He certainly was carrying a rather heavy burden up the stairs that night.

He waits patiently for John to cotton on, and again, John doesn't disappoint.

JOHN: He carried another person up there?

SHERLOCK: Wouldn't do to rent a single room, and then be caught bringing a companion, would it? There's a reason why he came at such a late hour, and why he took care to tell Mrs Warren beforehand not to bother to offer help. He wanted to make sure they wouldn't be observed. He couldn't risk the steps of two pairs of feet being overheard, either. So yes, he must have carried the other one on his back.

JOHN: But how did he get back out then? Mrs Warren can't have missed him going downstairs again.

SHERLOCK: The open skylight, of course, that Mrs Warren took such exception to on the next morning. Remember, Orme Street is a terrace. Nothing easier than to make his escape across the roofs, and Mrs Warren none the wiser.

John pinches the bridge of his nose with thumb and forefinger, thinking.

JOHN (after a moment): So if the true occupant of that room is a lot smaller and lighter than André - ? (Sherlock nods in confirmation.) Then it could be a woman?

SHERLOCK: It's very likely a woman.

JOHN (darkly): Then I can think of only one reason why a man would keep a woman locked in a room without anyone else knowing. And I don't like it at all.

SHERLOCK (with a short laugh): John, please don't let your sense of chivalry cloud your judgement. If we know one thing, it's that this woman is definitely not being held in that room against her will. It's exceptionally unsuitable as a prison. All she'd have to do is shout, or bang on the door, and help would come running at once. Her housemates hear her moving about and using the bathroom, so she's not restrained or anything.

JOHN: She could be drugged. Sedated. Not herself.

SHERLOCK (sardonically): With a drug whose effects last for four days straight? That would certainly be a novelty on the market. (He puts the tips of his fingers together and regards his friend in silence for a moment, then continues in a more conciliatory tone.) There are any number of reasons why a woman might need a safe place to hide for a while, John, and not all of them morally objectionable. She could be an illegal immigrant, fearing deportation. She could be a drug addict looking for a quiet place to detox. She could be a victim of domestic abuse, hiding from a violent partner or parent.

JOHN (disapprovingly): Or she could be a wanted criminal, on the run from the law.

SHERLOCK (waving the suggestion away): Whatever she is, she's fine with her current domicile, and in no danger from André at all. They're allies, not enemies.

JOHN (indignantly): She doesn't even get anything to eat up there!

SHERLOCK: Who says that André carried only her upstairs that night, and not also a range of non-perishable supplies for her to subsist on during her stay? Anyone who has ever lived in student accommodation, which happens to include both you and me, knows how surprisingly far you can get in that department with a kettle alone.

JOHN (still not entirely convinced): Hmm. ( He shifts in his seat, and his eyes return to the photo of the dancing men.) Still, it – it doesn't feel right, somehow. I'm –

He's clearly not ready to just let it go, even though he seems to have trouble articulating why.

SHERLOCK: I see your instinct is taking you exactly where your brain will arrive in a couple of minutes, too. (With a sudden surge of energy, he pushes himself back out of chair and resumes his pacing, his brow creased.) She is in danger from another quarter, no doubt. And that danger is serious and imminent, judging from the rigour of their precautions. I'm not nearly as worried about her as I am about him, you know. How far will he go to protect her?

JOHN: Where is he now, anyway?

SHERLOCK: Trying to resolve their trouble, whatever it is.

JOHN: And she's waiting for him to sort things out?

SHERLOCK: Yes, and in a considerable state of nervous agitation, too, going by her erratic patterns of sleep and activity that are driving her housemates to distraction. André can't come near her, of course, because if he does, he'll blow her cover and lead her enemies to her. But he keeps her updated, and in a very clever way, too. (He swivels on his heel, and points at the dancing men on the blackboard.) What better way to disguise your message than to make it look like the random doodles of a child? Non-digital encryption is going rapidly out of fashion, but I'm fairly familiar with most forms of it. Very few codes, however, manage to not only render the message itself unreadable to an outsider, but also obscure the fact that there's a message contained in it at all. (With the appreciation of a true connoisseur) It's positively ingenious.

JOHN (glancing up at the dancing men): And what makes you so sure that this is -

SHERLOCK: Remember what Mrs Warren told us André was most interested in when he first looked at the room?

JOHN (with a frown): She didn't say -

SHERLOCK: Oh yes, she did. It was the view from the window. "He looked around,", she said "and out the window like he expected a view". Very shrewdly observed, even though she had no idea what that motion signified. That's exactly what André was doing. He was checking whether the view from the window would enable his woman to see any messages he'd leave for her outside. Shinwell Johnson's garage wall provided the perfect canvas, so he took the room at once, even though it was a big strain on his budget.

JOHN (smiling a little whimsically): Because he "gulped" when Mrs Warren told him the price?

SHERLOCK: Precisely. (Returning the smile) You're finally getting the hang of this, John. (John pulls a face at him, but Sherlock continues, unfazed.) The room also had to have an en suite so the woman wouldn't have to leave it even for a minute. And the window had to be high up, away from prying eyes. It can't have been easy to find a place that met all those requirements. André certainly wasn't in a position to bargain. Interestingly, the only reason why André and his woman are communicating in this nifty little cipher at all may be the need for economy.

JOHN: How d'you mean?

SHERLOCK: If they could both afford phones, they could just text each other.

John grimaces in acknowledgment of the obviousness of this conclusion. Sherlock points with his chin at the photograph of the original dancing men, which John has placed on the arm of his chair.

SHERLOCK: And look at the writing material. It's charcoal. More precisely, lump charcoal from a type of hardwood that's rare in Britain but a very popular import from Paraguay. The grain structure is quite distinctive even at very low magnification. So instead of spending money on a spray can, or even just on a box of chalk, André went scavenging for leftover barbecue charcoal in someone's garden or backyard. Or, less risky, at one of the public barbecue areas in the woods around the Brent Reservoir. That's barely a mile from The Warren. There's no reason why he should get his hands dirty like that if he had the money to afford a less primitive writing technique.

JOHN: Right. So – (He looks up enquiringly at the new dancing men on the blackboard.) What about those, then?

SHERLOCK: Oh, they're merely an hypothesis. An exercise, if you like, based on the assumption that we're dealing with the most common type of code – a substitution cipher, in which each letter of the alphabet is represented by a different symbol. If its author were a famous cryptologist, this is how he'd introduce himself.

He plucks a piece of paper from the desk, and hands it to John. It's a handwritten table, with each type of dancing figure assigned to a letter of the alphabet. With its help, John slowly deciphers the letters encoded on the blackboard.

JOHN: "Am – here – Abe – Slaney". (Looking up, at a loss) Who the hell is Abe Slaney?

SHERLOCK: As I said, a famous cryptologist.

When John doesn't reply, Sherlock resumes his seat, as if in acknowledgment that his friend is entitled to a proper explanation.

SHERLOCK: Professor Abraham B. Slaney holds a chair in cryptography and cryptanalysis at Chicago University. He's an eminent capacity in that field. Mycroft consults him whenever the GCHQ are at their wits' end. (John lets out a low whistle, impressed.) I haven't been in touch for ages, but I'm sure he'd agree to help out. (With a crooked smile) For old times' sake.

JOHN: He's an old friend, then?

SHERLOCK: Of our mother's, actually. He's her age. They first met during their own uni days, and he used to be a guest in our house later, too, when he was in England for conferences and such. (He tilts his head back and fixes his eyes on an invisible spot on the ceiling.) He'd bring us puzzles, like other kids get sweets and toys. He'd place them on the sundial in the garden in the morning, and we'd run to get them as soon as we woke up. Eurus always solved hers the quickest. It might even have been Abe Slaney who coined the phrase "beyond Newton". Not sure though.

JOHN (after a moment, quietly): You remember things like that now?

SHERLOCK: Sometimes. (His fingers start picking absently at the arm of his chair.) Little enough. Just fragments, mostly. But they're making sense now. That helps.

John seems on the verge of asking "With what?", but decides against it.

SHERLOCK: And sometimes I ask, now, and get answers. That helps, too.

There's a silence, until Sherlock clears his throat and squares his shoulders, dismissing the issue.

SHERLOCK: Anyway. Substitution ciphers are cracked by frequency analysis. So what do you make of André's dancing men now?

JOHN (his eyes back on the photo): Hmm... The most common letter in English is "e", right? Of these eight figures, three are identical. The second, the fifth and the last. So if we assume that this particular man, the one with the arms up and the feet on the ground, represents "e" - what does that give us?

SHERLOCK: "Decrease". Or "fervence".

JOHN: Hmm. (He takes out his phone and starts typing on it. After a moment) I'm also getting "Bellevue" and "Hetaerae". (He looks up with a grin.) Crosswordtools dot org. Or is that cheating, too?

SHERLOCK: Not at all, but I'm afraid I fail to see how ancient Greek prostitutes come into the story. And "Bellevue" would just be a cruel sort of humour, considering the state of The Warren's backyard. No, but you see the problem, don't you?

JOHN: The message is too short to be definite?

SHERLOCK: Yes. Too little data, too many imponderables. What we're currently taking for an "e" could be a different letter, too. And even if we're right on that point, the eight men could represent several separate short words instead of just one long one. They could say "He ate pie", for all we know. Or the message could be incomplete, because André may have been interrupted when he put it there. Or, the bane of all decryption efforts, he may have made a mistake.

JOHN: It could be another language, too. Since Mrs Warren said he seemed foreign, I mean. (He stretches.) Well, I suppose there is no way of figuring out what it means, then?

SHERLOCK: Not without a longer sample. But until then -

Just then, his phone pings in the kitchen.

SHERLOCK (expectantly): Ah ha!

He jumps up from his seat and hurries to retrieve the phone from among the clutter on the kitchen table. He opens the message – and a satisfied grin spreads across his face.

JOHN (turning in his chair): Good news?

SHERLOCK (happily): The solution.

He hands his phone to John. On the screen is a snapshot very similar to the one Sherlock took the day before, showing the upper part of Shinwell Johnson's garage wall. But on the lintel above the doors, at least twenty more stick figures have now joined in the strange dance. These are also visibly grouped into four units of different length, as if to represent separate words.

SHERLOCK: And there's more.

John swipes the picture off to the left, and the next one appears – not of the garage this time, but of the roof of No. 14 Orme Street with its single dormer window. John frowns.

SHERLOCK: Enlarge it.

In close-up, it becomes apparent that there's now a row of stick figures dancing across the window pane up there, too. They're painted in some other substance than charcoal – something more viscous, less friable. It's difficult to tell from the distance, but they seem red in colour. There are eight of them, too, but they're different from the sample they collected the day before.

SHERLOCK (triumphantly): He's got news for her. And she's responding. Just like I expected.

JOHN (looking up from the phone): Are you saying you set Shinwell Johnson on this?

SHERLOCK: Of course. He asked whether I had a job for him. I had. (He holds out his hand to reclaim his phone.) And now excuse me while I forward these to Professor Slaney.

JOHN (with a laugh): What, aren't you gonna solve this for breakfast?

SHERLOCK: Waste of time. Slaney commands much greater computing power for this sort of analysis at his institute than anything I could set up in here, even with the help of the Baker Street botnet. He'll have the answer within seconds. Allowing for the time difference between London and Chicago, we should have the result by the afternoon.

He starts typing rapidly on his phone, then suddenly becomes aware of John's conspicuous silence. He glances up, and finds John looking at him with a scandalised expression on his face, his eyebrows disappearing into his hair.

JOHN: The Baker Street botnet? Do I actually want to know about that?

SHERLOCK (quickly): Probably not. (He has the grace to blush, at least a little.) I assure you that in the interest of good neighbourly relations, I try to restrict its use to a minimum.

John only shakes his head at him.