#include<bits/stdc++.h>
using namespace std ;
const int N = 55 ;
int n , m , x , y ;
int main(){
cin >> n >> m ;
cout << "? " ;
for(int i=1 ; i<m ; i++) cout << '>' ;
cin >> x >> y ;
if(y!=m-1){
cout << "! 0 " << y+1 << endl ;
return 0 ;
}
for(int i=0 ; i<min(n,m)-1 ; i++){
cout << "? " ;
for(int j=0 ; j<i ; j++) cout << '>' ;
for(int j=n-i-1 ; j>0 ; j--) cout << 'v' ;
for(int j=m-i-1 ; j>0 ; j--) cout << '>' ;
cout << endl ;
cin >> x >> y ;
if(x==n-1-i && y==m-1-i) continue ;
// n-1-i , m-1-i
if(x==n-1-i) cout << "! " << x << ' ' << y+1 << endl ;
else cout << "! " << x+1 << ' ' << i << endl ;
return 0 ;
}
cout << "! 0 " << m-1 << endl ;
return 0 ;
}