Where I'm going wrong?

why its not accepting? passed only one test case. my code- https://ideone.com/e8kpUa

It can be shifted by an number of letters, not only three.