#include <bits/stdc++.h>   int main() {     char str[3][100];     int i;     for (i = 0; i < 3; i++) {       scanf( %s  , &str[i][0]);     }     int r = 0, p = 0, s = 0;     for (i = 0; i < 3; i++) {       if (str[i][0] ==  r )         r++;       else if (str[i][0] ==  p )         p++;       else if (str[i][0] ==  s )         s++;     }     char m =  a ;     if (r == 1 && s == 2)       m =  r ;     else if (s == 1 && p == 2)       m =  s ;     else if (p == 1 && r == 2)       m =  p ;     if (m !=  a ) {       for (i = 0; i < 3; i++) {         if (str[i][0] == m) break;       }       if (i == 0)         printf( F );       else if (i == 1)         printf( M );       else if (i == 2)         printf( S );     } else       printf( ? );   }   