#include<iostream>
using namespace std;
int H, W;
typedef pair<int,int> pii;
pii move(int right, int down) {
if(right + down == 0) return {-1,-1};
cout<<"? ";
for(int i=0; i<right; i++) cout<<'>';
for(int i=0; i<down; i++) cout<<'v';
cout<<endl;
int x, y;
cin>>x>>y;
return {x,y};
}
bool expected(int right, int down, int x, int y) {
if(y == right && x == down) return true;
return false;
}
void found(int right, int down, int x, int y) {
cout<<"! ";
if(down == x) {cout<<0<<' '<<y+1<<endl; return;}
else {
cout<<x+1<<' '<<y<<endl; return;
}
}
int main() {
cin>>H>>W;
for(int right = 0; right<W; right++) {
pii p = move(right, H-1);
if(expected(right, H-1, p.first, p.second)) continue;
else {found(right, H-1, p.first, p.second); break;}
}
}