// pC
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define pii pair<LL, LL>
#define S second
#define F first
const int maxn = 3e5+10;
int h, w;
map<char, int> dx = { {'<', 0}, {'>', 0}, {'^', 1}, {'v', -1} };
map<char, int> dy = { {'<', -1}, {'>', 1}, {'^', 0}, {'v', 0} };
bool qq(int x, int y, int k){
// cout<<x<<" "<<y<<"\n";
string s="";
for(int i=1; i<=x; i++) s+="v";
for(int i=1; i<=y; i++) s+=">";
cout << "? " << s << endl;
int xx, yy; cin >> xx >> yy;
if(xx==x and y==yy) return 0;
if(k==0) cout << "! " << xx+1<<" "<<yy << endl;
else cout << "! " << xx<<" "<<yy+1<< endl;
return 1;
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cin>>h>>w;
if( qq(h-1, 0, 0) ){
return 0;
}
for(int i=0; i<h; i++) if( qq(i, w-1, 1) ) return 0;
// return 0;
}