Replace within the fragment

Replace within the fragment. Given a string, replace every occurrence of the letter “h” with the letter “H”, except for the first and the last occurrences.

Test Case Input (String) Expected Output
1 hello heh hello HeH
2 hhhhhh hHHHh
3 ahoy ahoy