today scientific lyceum Kingdom Kremland biology lesson the topic lesson genome Lets genome string ACTGMaxim boring sit class teacher come task give string s consist uppercase letter length 4 need find minimum number operation need apply genome appear substre for operation replace letter string s previous alphabet for example letter D previous c e in problem assume letter a previous letter z b letter z previous letter Y letter AHelp Maxim solve problem teacher give himA string substre string b obtain b deletion possibly zero character begin possibly zero character end