/*
* 解題思路:
* 很簡單的一道水題,直接按題目訊息輸出即可
*/
#include#include int main( ) { int t; int len; char s[ 1000 ]; scanf("%d",&t); while( t-- ) { scanf("%s",s); len = strlen( s ); if( (s[ 0 ] == '1' && len == 1) || (s[ 0 ] == '4' && len == 1 ) || ( s[ 0 ] == '7' && s[ 1 ] == '8' && len == 2 ) ) printf("+\n"); else if( s[ len-1 ] == '5' && s[ len-2 ] == '3' ) printf("-\n"); else if( s[ 0 ] == '9' && s[ len-1 ] == '4' ) printf("*\n"); else if( s[ 0 ] == '1' && s[ 1 ] == '9' && s[ 2 ] == '0' ) printf("?\n"); } return 0; }