#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <iomanip>
#include <limits.h>
#include <set>
#include <string>
#include <queue>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <deque>
#include <map>
#include <chrono>
#include <random>
#include <bitset>
#include <tuple>
#define SZ(x) int(x.size())
#define FR(i,a,b) for(int i=(a);i<(b);++i)
#define FOR(i,n) FR(i,0,n)
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define A first
#define B second
#define mp(a,b) make_pair(a,b)
typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
typedef unsigned __int128 U128;
typedef __int128 I128;
typedef std::pair<int,int> PII;
typedef std::pair<LL,LL> PLL;
using namespace std;
//snek
//3 queries: snek 1, snek 2
signed main(){
int h,w; cin>>h>>w;
int off=(w-1)/2;
LL col=-1;
//q1: identify right or left half
string s="";
FOR(i,w-off-1) s+='>';
FOR(i,h){
FOR(j,off) s+='>';
FOR(j,off) s+='<';
s+='v';
}
cout<<"? "<<s<<endl;
LL r,c; cin>>r>>c;
if (r<h-1){
cout<<"! "<<r+1<<" "<<c<<endl;
return 0;
}
else if (c<w-1-off){
col=c+off+1;
string s="";
FOR(i,col) s+=">";
FOR(i,67) s+="v";
cout<<"? "<<s<<endl;
cin>>r>>c;
if (c<col) cout<<"! "<<0<<" "<<c+1<<endl;
else cout<<"! "<<r+1<<" "<<col<<endl;
return 0;
}
else{
string s="";
FOR(i,w-1-off) s+=">";
LL d=w-2-off;
FOR(i,h-1){
s+="v";
FOR(j,d) s+="<";
FOR(j,d) s+=">";
}
FOR(i,d+1) s+="<";
FOR(i,67) s+="^";
cout<<"? "<<s<<endl;
cin>>r>>c;
if (r==0) cout<<"! "<<h-1<<" "<<c-1<<endl;
else cout<<"! "<<r-1<<" "<<c<<endl;
return 0;
}
return 0;
}