there special typewriter lowercase english letter z arrange circle pointer a character type pointer pointing character the pointer initially point character aEach second perform follow operationsmove pointer character counterclockwise clockwiseType character pointer currently ongiven string word return minimum number second type character word example 1input word abcoutput 5explanation the character print follow type character 1 second pointer initially move pointer clockwise b 1 second Type character b 1 second Move pointer clockwise c 1 second type character c 1 secondexample 2input word bzaoutput 7explanationthe character print follow Move pointer clockwise b 1 second Type character b 1 second Move pointer counterclockwise z 2 second type character z 1 second move pointer clockwise 1 second Type character 1 secondexample 3input word zjpcoutput 34explanationthe character print follow Move pointer counterclockwise z 1 second type character z 1 second move pointer clockwise j 10 second Type character j 1 second Move pointer clockwise p 6 second Type character p 1 second Move pointer counterclockwise c 13 second type character c 1 second Constraints1 wordlength 100word consist lowercase english letter