#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n, m;
cin >> n >> m;
for( int i=0 ; i<n ; i++ ){
string s="";
for( int j=0 ; j<i ; j++ ) s+='v';
for( int j=0 ; j<m ; j++ ) s+='>';
cout << '?' << ' ' << s << endl;
int x, y;
cin >> x >> y;
if( x==i-1 ){
cout << '!' << ' ' << i << ' ' << 0 << '\n';
return 0;
}
else if( y!=m-1 ){
cout << '!' << ' ' << i << ' ' << y+1 << '\n';
return 0;
}
}
cout << '!' << ' ' << n-1 << ' ' << m-1 << '\n';
return 0;
}