class StringRotation {
  public:
    string rotateString(string A, int n, int p) {
        // write code here
        string res=A.substr(p+1,n)+A.substr(0,p+1);
        return res;
    }
};