Recent actions

Hello , In the Problem Little Artem and Grasshopper.

I made 2 cases,

First case — When string's current index is having '>' as direction , then if this index + the distance he has to jump exceeds n-1. Then he will go out of the array.

Second case — When string's current index is '<' as direction , then if this index — the distance he has to jump is less than 0. Then also he will go out of the array.

But this logic is giving me WRONG_ANSWER on test case 29. Can anybody help me ?

Created or updated the text