Reverse the fragment

Reverse the fragment. Given a string in which the letter “h” occurs at least twice, reverse the sequence of characters enclosed between the first and last occurrences of “h”.

Test Case Input (String) Expected Output
1 hellohehworld hellohheworld
2 hhhellohh hhhholleh
3 hehaheheho hehahheheo