#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(ll i=0; i<n; i++)
#define rrep(i,n) for(ll i=n-1; i>=0; i--)
#define print(a) cout<<a<<endl
typedef long long ll;
#define yn(flg) if(flg){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define YN(flg) if(flg){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define so(a) sort(a.begin(),a.end())
#define mp make_pair
#define vi vector<int>
#define vl vector<ll>
#define vs vector<string>
#define pb push_back
#define a2i(a,s) (ll)(a-s)
#define i2a(s,a) (char)(s+a)
#define ssize(a) a.size()
typedef pair<int, int> Pii;
typedef pair<int, ll> Pil;
typedef pair<pair<ll,ll>,ll> P3;
typedef pair<pair<ll,ll>,pair<ll,ll>> P4;
typedef pair<ll, ll> Pll;
typedef pair<ll,Pll> Plll;
typedef pair<Pii, int> Piii;
const ll INF = 1000000000000000000;
template<class T> inline bool chmin(T& a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template<class T> inline bool chmax(T& a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
int main(){
// cin:tie(0);
// ios::stnc_with_stdio(0);
//入力
ll h,w;
cin>>h>>w;
cout<<'?';
string s;
for(ll i=0;i<w-1;i++){
s+='>';
}
cout<<s<<endl;
ll x,y;
cin>>x>>y;
if(y!=w-1){
cout<<'!'<<x<<" "<<y+1<<endl;
return 0;
}
//全探索
for(ll i=0;i<w;i++){
cout<<'?';
string s2;
for(ll j=0;j<i;j++){
s2+='>';
}
for(ll j=0;j<h-1;j++){
s2+='v';
}
cout<<s2<<endl;
ll X,Y;
cin>>X>>Y;
if(X!=h-1){
cout<<'!'<<X+1<<" "<<Y<<endl;
return 0;
}
}
}