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CZHAGDQGJMMZARMUVFGJXKDIKQGYYFYEVVSYZWXDQMHNMMZGYVDSKWSHQPSNOGYNUOBFVPAKIEDEIRCEBFDCYYEMLZIGOEVLFEVLVXGXXJVTKGTPGDMLAFAJZGAQGYFVQTFVQARWLAKXCEGX"
def stringShift(str,n):
   slen=len(str)
   return str[n:slen+1]+str[0:n]

def countCoincidences(str1,str2):
   slen=len(str1)
   coin=0
   for j in [0..slen-1]:
        if str1[j]==str2[j]:
            coin=coin+1
   return coin

def breakStringMod(str,m):
    cts=['']*m
    slen=len(str)
    for i in range(slen):
       cts[i%m]=cts[i%m]+str[i]
    return cts

def countLetterFrequencies(str):
    alph='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    for i in alph:
       print i, str.count(i)

#Sage code to decipher text:
alphabet = AlphabeticStrings()
ciphertextEncoded = alphabet.encoding(ciphertext)
system = VigenereCryptosystem(alphabet,7)
key = alphabet("SECRETS")

plaintext = system.deciphering(key, ciphertextEncoded)
plaintext
MRSHERLOCKHOLMESWHOWASUSUALLYVERYLATEINTHEMORNINGSSAVEUPONTHOSENOTINFREQUENTOCCASIONSWHENHESTAYEDUPALLNIGHTWASSEATEDATTHEBREAKFASTTABLEISTOODUPONTHEHEARTHRUGANDPICKEDUPTHESTICKWHICHOURVISITORHADLEFTBEHINDHIMTHENIGHTBEFOREITWASAFINETHICKPIECEOFWOODBULBOUSHEADEDOFTHESORTWHICHISKNOWNASAPENANGLAWYERJUSTUNDERTHEHEADWASABROADSILVERBANDNEARLYANINCHACROSSTOJAMESMORTIMERMRCSFROMHISFRIENDSOFTHECCHWASENGRAVEDUPONITWITHTHEDATEITWASJUSTSUCHASTICKASTHEOLDFASHIONEDFAMILYPRACTITIONERUSEDTOCARRYDIGNIFIEDSOLIDANDREASSURINGWELLWATSONWHATDOYOUMAKEOFITHOLMESWASSITTINGWITHHISBACKTOMEANDIHADGIVENHIMNOSIGNOFMYOCCUPATIONHOWDIDYOUKNOWWHATIWASDOINGIBELIEVEYOUHAVEEYESINTHEBACKOFYOURHEADIHAVEATLEASTAWELLPOLISHEDSILVERPLATEDCOFFEEPOTINFRONTOFMESAIDHEBUTTELLMEWATSONWHATDOYOUMAKEOFOURVISITORSSTICKSINCEWEHAVEBEENSOUNFORTUNATEASTOMISSHIMANDHAVENONOTIONOFHISERRANDTHISACCIDENTALSOUVENIRBECOMESOFIMPORTANCELETMEHEARYOURECONSTRUCTTHEMANBYANEXAMINATIONOFITITHINKSAIDIFOLLOWINGSOFARASICOULDTHEMETHODSOFMYCOMPANIONTHATDRMORTIMERISASUCCESSFULELDERLYMEDICALMANWELLESTEEMEDSINCETHOSEWHOKNOWHIMGIVEHIMTHISMARKOFTHEIRAPPRECIATIONGOODSAIDHOLMESEXCELLENTITHINKALSOTHATTHEPROBABILITYISINFAVOUROFHISBEINGACOUNTRYPRACTITIONERWHODOESAGREATDEALOFHISVISITINGONFOOTWHYSOBECAUSETHISSTICKTHOUGHORIGINALLYAVERYHANDSOMEONEHASBEENSOKNOCKEDABOUTTHATICANHARDLYIMAGINEATOWNPRACTITIONERCARRYINGITTHETHICKIRONFERRULEISWORNDOWNSOITISEVIDENTTHATHEHASDONEAGREATAMOUNTOFWALKINGWITHITPERFECTLYSOUNDSAIDHOLMESANDTHENAGAINTHEREISTHEFRIENDSOFTHECCHISHOULDGUESSTHATTOBETHESOMETHINGHUNTTHELOCALHUNTTOWHOSEMEMBERSHEHASPOSSIBLYGIVENSOMESURGICALASSISTANCEANDWHICHHASMADEHIMASMALLPRESENTATIONINRETURNREALLYWATSONYOUEXCELYOURSELFSAIDHOLMESPUSHINGBACKHISCHAIRANDLIGHTINGACIGARETTEIAMBOUNDTOSAYTHATINALLTHEACCOUNTSWHICHYOUHAVEBEENSOGOODASTOGIVEOFMYOWNSMALLACHIEVEMENTSYOUHAVEHABITUALLYUNDERRATEDYOUROWNABILITIESITMAYBETHATYOUARENOTYOURSELFLUMINOUSBUTYOUAREACONDUCTOROFLIGHTSOMEPEOPLEWITHOUTPOSSESSINGGENIUSHAVEAREMARKABLEPOWEROFSTIMULATINGITICONFESSMYDEARFELLOWTHATIAMVERYMUCHINYOURDEBTHEHADNEVERSAIDASMUCHBEFOREANDIMUSTADMITTHATHISWORDSGAVEMEKEENPLEASUREFORIHADOFTENBEENPIQUEDBYHISINDIFFERENCETOMYADMIRATIONANDTOTHEATTEMPTSWHICHIHADMADETOGIVEPUBLICITYTOHISMETHODSIWASPROUDTOOTOTHINKTHATIHADSOFARMASTEREDHISSYSTEMASTOAPPLYITINAWAYWHICHEARNEDHISAPPROVALHENOWTOOKTHESTICKFROMMYHANDSANDEXAMINEDITFORAFEWMINUTESWITHHISNAKEDEYESTHENWITHANEXPRESSIONOFINTERESTHELAIDDOWNHISCIGARETTEANDCARRYINGTHECANETOTHEWINDOWHELOOKEDOVERITAGAINWITHACONVEXLENSINTERESTINGTHOUGHELEMENTARYSAIDHEASHERETURNEDTOHISFAVOURITECORNEROFTHESETTEETHEREARECERTAINLYONEORTWOINDICATIONSUPONTHESTICKITGIVESUSTHEBASISFORSEVERALDEDUCTIONSHASANYTHINGESCAPEDMEIASKEDWITHSOMESELFIMPORTANCEITRUSTTHATTHEREISNOTHINGOFCONSEQUENCEWHICHIHAVEOVERLOOKEDIAMAFRAIDMYDEARWATSONTHATMOSTOFYOURCONCLUSIONSWEREERRONEOUSWHENISAIDTHATYOUSTIMULATEDMEIMEANTTOBEFRANKTHATINNOTINGYOURFALLACIESIWASOCCASIONALLYGUIDEDTOWARDSTHETRUTHNOTTHATYOUAREENTIRELYWRONGINTHISINSTANCETHEMANISCERTAINLYACOUNTRYPRACTITIONERANDHEWALKSAGOODDEALTHENIWASRIGHTTOTHATEXTENTBUTTHATWASALLNONOMYDEARWATSONNOTALLBYNOMEANSALLIWOULDSUGGESTFOREXAMPLETHATAPRESENTATIONTOADOCTORISMORELIKELYTOCOMEFROMAHOSPITALTHANFROMAHUNTANDTHATWHENTHEINITIALSCCAREPLACEDBEFORETHATHOSPITALTHEWORDSCHARINGCROSSVERYNATURALLYSUGGESTTHEMSELVESYOUMAYBERIGHTTHEPROBABILITYLIESINTHATDIRECTIONANDIFWETAKETHISASAWORKINGHYPOTHESISWEHAVEAFRESHBASISFROMWHICHTOSTARTOURCONSTRUCTIONOFTHISUNKNOWNVISITORWELLTHENSUPPOSINGTHATCCHDOESSTANDFORCHARINGCROSSHOSPITALWHATFURTHERINFERENCESMAYWEDRAWDONONESUGGESTTHEMSELVESYOUKNOWMYMETHODSAPPLYTHEMICANONLYTHINKOFTHEOBVIOUSCONCLUSIONTHATTHEMANHASPRACTISEDINTOWNBEFOREGOINGTOTHECOUNTRYITHINKTHATWEMIGHTVENTUREALITTLEFARTHERTHANTHISLOOKATITINTHISLIGHTONWHATOCCASIONWOULDITBEMOSTPROBABLETHATSUCHAPRESENTATIONWOULDBEMADEWHENWOULDHISFRIENDSUNITETOGIVEHIMAPLEDGEOFTHEIRGOODWILLOBVIOUSLYATTHEMOMENTWHENDRMORTIMERWITHDREWFROMTHESERVICEOFTHEHOSPITALINORDERTOSTARTAPRACTICEFORHIMSELFWEKNOWTHEREHASBEENAPRESENTATIONWEBELIEVETHEREHASBEENACHANGEFROMATOWNHOSPITALTOACOUNTRYPRACTICEISITTHENSTRETCHINGOURINFERENCETOOFARTOSAYTHATTHEPRESENTATIONWASONTHEOCCASIONOFTHECHANGEITCERTAINLYSEEMSPROBABLENOWYOUWILLOBSERVETHATHECOULDNOTHAVEBEENONTHESTAFFOFTHEHOSPITALSINCEONLYAMANWELLESTABLISHEDINALONDONPRACTICECOULDHOLDSUCHAPOSITIONANDSUCHAONEWOULDNOTDRIFTINTOTHECOUNTRYWHATWASHETHENIFHEWASINTHEHOSPITALANDYETNOTONTHESTAFFHECOULDONLYHAVEBEENAHOUSESURGEONORAHOUSEPHYSICIANLITTLEMORETHANASENIORSTUDENTANDHELEFTFIVEYEARSAGOTHEDATEISONTHESTICKSOYOURGRAVEMIDDLEAGEDFAMILYPRACTITIONERVANISHESINTOTHINAIRMYDEARWATSONANDTHEREEMERGESAYOUNGFELLOWUNDERTHIRTYAMIABLEUNAMBITIOUSABSENTMINDEDANDTHEPOSSESSOROFAFAVOURITEDOGWHICHISHOULDDESCRIBEROUGHLYASBEINGLARGERTHANATERRIERANDSMALLERTHANAMASTIFFILAUGHEDINCREDULOUSLYASSHERLOCKHOLMESLEANEDBACKINHISSETTEEANDBLEWLITTLEWAVERINGRINGSOFSMOKEUPTOTHECEILINGASTOTHELATTERPARTIHAVENOMEANSOFCHECKINGYOUSAIDIBUTATLEASTITISNOTDIFFICULTTOFINDOUTAFEWPARTICULARSABOUTTHEMANSAGEANDPROFESSIONALCAREERFROMMYSMALLMEDICALSHELFITOOKDOWNTHEMEDICALDIRECTORYANDTURNEDUPTHENAMETHEREWERESEVERALMORTIMERSBUTONLYONEWHOCOULDBEOURVISITORIREADHISRECORDALOUDMORTIMERJAMESMRCSGRIMPENDARTMOORDEVONHOUSESURGEONFROMTOATCHARINGCROSSHOSPITALWINNEROFTHEJACKSONPRIZEFORCOMPARATIVEPATHOLOGYWITHESSAYENTITLEDISDISEASEAREVERSIONCORRESPONDINGMEMBEROFTHESWEDISHPATHOLOGICALSOCIETYAUTHOROFSOMEFREAKSOFATAVISMLANCETDOWEPROGRESSJOURNALOFPSYCHOLOGYMARCHMEDICALOFFICERFORTHEPARISHESOFGRIMPENTHORSLEYANDHIGHBARROWNOMENTIONOFTHATLOCALHUNTWATSONSAIDHOLMESWITHAMISCHIEVOUSSMILEBUTACOUNTRYDOCTORASYOUVERYASTUTELYOBSERVEDITHINKTHATIAMFAIRLYJUSTIFIEDINMYINFERENCESASTOTHEADJECTIVESISAIDIFIREMEMBERRIGHTAMIABLEUNAMBITIOUSANDABSENTMINDEDITISMYEXPERIENCETHATITISONLYANAMIABLEMANINTHISWORLDWHORECEIVESTESTIMONIALSONLYANUNAMBITIOUSONEWHOABANDONSALONDONCAREERFORTHECOUNTRYANDONLYANABSENTMINDEDONEWHOLEAVESHISSTICKANDNOTHISVISITINGCARDAFTERWAITINGANHOURINYOURROOMANDTHEDOGHASBEENINTHEHABITOFCARRYINGTHISSTICKBEHINDHISMASTERBEINGAHEAVYSTICKTHEDOGHASHELDITTIGHTLYBYTHEMIDDLEANDTHEMARKSOFHISTEETHAREVERYPLAINLYVISIBLETHEDOGSJAWASSHOWNINTHESPACEBETWEENTHESEMARKSISTOOBROADINMYOPINIONFORATERRIERANDNOTBROADENOUGHFORAMASTIFFITMAYHAVEBEENYESBYJOVEITISACURLYHAIREDSPANIELHEHADRISENANDPACEDTHEROOMASHESPOKENOWHEHALTEDINTHERECESSOFTHEWINDOWTHEREWASSUCHARINGOFCONVICTIONINHISVOICETHATIGLANCEDUPINSURPRISEMYDEARFELLOWHOWCANYOUPOSSIBLYBESOSUREOFTHATFORTHEVERYSIMPLEREASONTHATISEETHEDOGHIMSELFONOURVERYDOORSTEPANDTHEREISTHERINGOFITSOWNERDONTMOVEIBEGYOUWATSONHEISAPROFESSIONALBROTHEROFYOURSANDYOURPRESENCEMAYBEOFASSISTANCETOMENOWISTHEDRAMATICMOMENTOFFATEWATSONWHENYOUHEARASTEPUPONTHESTAIRWHICHISWALKINGINTOYOURLIFEANDYOUKNOWNOTWHETHERFORGOODORILLWHATDOESDRJAMESMORTIMERTHEMANOFSCIENCEASKOFSHERLOCKHOLMESTHESPECIALISTINCRIMECOMEINTHEAPPEARANCEOFOURVISITORWASASURPRISETOMESINCEIHADEXPECTEDATYPICALCOUNTRYPRACTITIONERHEWASAVERYTALLTHINMANWITHALONGNOSELIKEABEAKWHICHSHOTOUTBETWEENTWOKEENGREYEYESSETCLOSELYTOGETHERANDSPARKLINGBRIGHTLYFROMBEHINDAPAIROFGOLDRIMMEDGLASSESHEWASCLADINAPROFESSIONALBUTRATHERSLOVENLYFASHIONFORHISFROCKCOATWASDINGYANDHISTROUSERSFRAYEDTHOUGHYOUNGHISLONGBACKWASALREADYBOWEDANDHEWALKEDWITHAFORWARDTHRUSTOFHISHEADANDAGENERALAIROFPEERINGBENEVOLENCEASHEENTEREDHISEYESFELLUPONTHESTICKINHOLMESSHANDANDHERANTOWARDSITWITHANEXCLAMATIONOFJOYIAMSOVERYGLADSAIDHEIWASNOTSUREWHETHERIHADLEFTITHEREORINTHESHIPPINGOFFICEIWOULDNOTLOSETHATSTICKFORTHEWORLDAPRESENTATIONISEESAIDHOLMESYESSIRFROMCHARINGCROSSHOSPITALFROMONEORTWOFRIENDSTHEREONTHEOCCASIONOFMYMARRIAGEDEARDEARTHATSBADSAIDHOLMESSHAKINGHISHEADDRMORTIMERBLINKEDTHROUGHHISGLASSESINMILDASTONISHMENTWHYWASITBADONLYTHATYOUHAVEDISARRANGEDOURLITTLEDEDUCTIONSYOURMARRIAGEYOUSAYYESSIRIMARRIEDANDSOLEFTTHEHOSPITALANDWITHITALLHOPESOFACONSULTINGPRACTICEITWASNECESSARYTOMAKEAHOMEOFMYOWNCOMECOMEWEARENOTSOFARWRONGAFTERALLSAIDHOLMESANDNOWDRJAMESMORTIMERMISTERSIRMISTERAHUMBLEMRCSANDAMANOFPRECISEMINDEVIDENTLYADABBLERINSCIENCEMRHOLMESAPICKERUPOFSHELLSONTHESHORESOFTHEGREATUNKNOWNOCEANIPRESUMETHATITISMRSHERLOCKHOLMESWHOMIAMADDRESSINGANDNOTNOTHISISMYFRIENDDRWATSONGLADTOMEETYOUSIRIHAVEHEARDYOURNAMEMENTIONEDINCONNECTIONWITHTHATOFYOURFRIENDYOUINTERESTMEVERYMUCHMRHOLMESIHADHARDLYEXPECTEDSODOLICHOCEPHALICASKULLORSUCHWELLMARKEDSUPRAORBITALDEVELOPMENTWOULDYOUHAVEANYOBJECTIONTOMYRUNNINGMYFINGERALONGYOURPARIETALFISSUREACASTOFYOURSKULLSIRUNTILTHEORIGINALISAVAILABLEWOULDBEANORNAMENTTOANYANTHROPOLOGICALMUSEUMITISNOTMYINTENTIONTOBEFULSOMEBUTICONFESSTHATICOVETYOURSKULLSHERLOCKHOLMESWAVEDOURSTRANGEVISITORINTOACHAIRYOUAREANENTHUSIASTINYOURLINEOFTHOUGHTIPERCEIVESIRASIAMINMINESAIDHEIOBSERVEFROMYOURFOREFINGERTHATYOUMAKEYOUROWNCIGARETTESHAVENOHESITATIONINLIGHTINGONETHEMANDREWOUTPAPERANDTOBACCOANDTWIRLEDTHEONEUPINTHEOTHERWITHSURPRISINGDEXTERITYHEHADLONGQUIVERINGFINGERSASAGILEANDRESTLESSASTHEANTENNAEOFANINSECTHOLMESWASSILENTBUTHISLITTLEDARTINGGLANCESSHOWEDMETHEINTERESTWHICHHETOOKINOURCURIOUSCOMPANIONIPRESUMESIRSAIDHEATLASTTHATITWASNOTMERELYFORTHEPURPOSEOFEXAMININGMYSKULLTHATYOUHAVEDONEMETHEHONOURTOCALLHERELASTNIGHTANDAGAINTODAYNOSIRNOTHOUGHIAMHAPPYTOHAVEHADTHEOPPORTUNITYOFDOINGTHATASWELLICAMETOYOUMRHOLMESBECAUSEIRECOGNISETHATIAMMYSELFANUNPRACTICALMANANDBECAUSEIAMSUDDENLYCONFRONTEDWITHAMOSTSERIOUSANDEXTRAORDINARYPROBLEMRECOGNISINGASIDOTHATYOUARETHESECONDHIGHESTEXPERTINEUROPEINDEEDSIRMAYIINQUIREWHOHASTHEHONOURTOBETHEFIRSTASKEDHOLMESWITHSOMEASPERITYTOTHEMANOFPRECISELYSCIENTIFICMINDTHEWORKOFMONSIEURBERTILLONMUSTALWAYSAPPEALSTRONGLYTHENHADYOUNOTBETTERCONSULTHIMISAIDSIRTOTHEPRECISELYSCIENTIFICMINDBUTASAPRACTICALMANOFAFFAIRSITISACKNOWLEDGEDTHATYOUSTANDALONEITRUSTSIRTHATIHAVENOTINADVERTENTLYJUSTALITTLESAIDHOLMESITHINKDRMORTIMERYOUWOULDDOWISELYIFWITHOUTMOREADOYOUWOULDKINDLYTELLMEPLAINLYWHATTHEEXACTNATUREOFTHEPROBLEMISINWHICHYOUDEMANDMYASSISTANCE