#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=0 ; i<m ; i++) cout << '>' ;
for(int i=0 ; i<n ; i++) cout << 'v' ;
cout << endl ;
cin >> x >> y ;
if(x!=n-1 || y!=m-1){
if(x!=n-1) x++ ;
else y++ ;
cout << "! " << x << ' ' << y << endl ;
return 0 ;
}
cout << "? " ;
for(int i=0 ; i<n ; i++){
for(int j=0 ; j<m ; j++) cout << '>' ;
for(int j=1 ; j<m ; j++) cout << "v<^" ;
cout << "<v" ;
}
cout << endl ;
cin >> x >> y ;
cout << x << ' ' << y-1 << endl ;
return 0 ;
}