#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define lsb(x) (x&(-x))
#define pii pair<int,int>
#define ss second
#define ff first
#define piii pair<int,pii>
#define debu(x) (cerr << #x << " = "<< x << "\n")
#define debu2(x,y) (cerr << #x << " = "<< x << " " << #y << " = " << y << "\n")
#define debu3(x,y,z) (cerr << #x << " = "<< x << " " << #y << " = " << y << " " << #z << " = " << z<< "\n")
#define bitout(x,y) {\
cerr << #x << " : ";\
for (int justforbits = y; justforbits >=0; justforbits--)cout << (((1 << justforbits) & x)>=1);\
cout << "\n";\
}
#define rangeout(j,rangestart,rangeend) {\
cerr << "outputting " << #j<< ":\n";\
for (int forrang = rangestart; forrang <= rangeend; forrang++)cerr << j[forrang] << " ";\
cerr<<"\n";\
}
#define c1 {cerr << "Checkpoint 1! \n\n";cerr.flush();}
#define c2 {cerr << "Checkpoint 2! \n\n";cerr.flush();}
#define c3 {cerr << "Checkpoint 3! \n\n";cerr.flush();}
#define c4 {cerr << "Checkpoint 4! \n\n";cerr.flush();}
#define vi vector<int>
#define vpii vector<pii>
#define fr(i,x,y) for(int i=x;i<=y;i++)
int h,w,x;bool parity;
void op(vector<char>&tbp)
{
cout<<"? ";
for(char i:tbp)
{
cout<<i;
}
cout<<endl;cout.flush();
tbp=vector<char>();
}
void ans(int x, int y)
{
cout<<"! "<<x<<" "<<y<<endl;
cout.flush();exit(0);
}
signed main()
{
int t1,t2,t3,t4;
mt19937_64 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
//ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin>>h>>w;x=w/2;
vector<char>tbp;
fr(i,1,x){tbp.pb('>');}
fr(i,1,h)
{
fr(ii,x+1,w-1){tbp.pb('>');}
fr(ii,x+1,w-1){tbp.pb('<');}
tbp.pb('v');
}
op(tbp);
cin>>t1>>t2;
if(t1!=h-1){ans(t1+1,x);}
else if(t2!=x)
{
t2+=w-x;
fr(i,1,t2)tbp.pb('>');
fr(i,1,h-1)tbp.pb('v');
op(tbp);
cin>>t3>>t4;
if(t4<t2){ans(0,t4+1);}
else{ans(t3+1,t2);}
}
else
{
for(int i=1;i<=x-1;i++){tbp.pb('>');}
fr(i,1,h)
{
for(int ii=0;ii<x-1;ii++){tbp.pb('<');}
for(int ii=0;ii<x-1;ii++){tbp.pb('>');}
tbp.pb('v');
}
op(tbp);
cin>>t1>>t2;
if(t1!=h-1){ans(t1+1,x-1);}
else
{
t2-=x;
fr(i,1,t2)tbp.pb('>');
fr(i,1,h-1)tbp.pb('v');
op(tbp);
cin>>t3>>t4;
ans(t3+1,t2);
}
/*fr(i,1,50){tbp.pb('^');}
fr(i,0,x){tbp.pb('<');}
fr(i,0,h){tbp.pb('v');}
op(tbp);
cin>>t1>>t2;
ans(t1+1,t2);*/
}
}