What is wrong in my code!

view this problem and check my solution…give me a testcase where my solution fails
#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define ld long double
#define pb push_back
#define pi pair<int,int>
#define pl pair<ll,ll>

ll solve(string s[],ll n,ll ro,ll co,ll m,ll cur,string p)
{
if(cur==m)
return 1;

else if(ro>=n || ro<0 || co>=n || co<0)
    return 0;

else if (p[cur]==s[ro][co])
    return max(solve(s,n,ro,co+1,m,cur+1,p),max(solve(s,n,ro+1,co,m,cur+1,p),solve(s,n,ro+1,co+1,m,cur+1,p)));

}

int main() {
ll n,i,j,m,ans;
cin>>n;
string s[n];
for(i=0;i<n;i++)
cin>>s[i];
cin>>m;
string p;
cin>>p;

for(i=0;i<n;i++)
{
    for(j=0;j<n;j++)
    {
         if(s[i][j]==p[0])
        {
        ans=solve(s,n,i,j,m,0,p);
        if(ans==1)
        {
            cout<<"Yes"<<endl;
            return 0;
        }
        }
    }
}
cout<<"No"<<endl;



return 0;

}