So your desired output would be OLLEH?

If don't know if this helps, but you can also take letters separate out of it.
That might be another way of solving it. (There are multiple ways to Rome...