func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   string T[20];   bool comp[40][1 << 20];   int res[40][1 << 20];   int pts(char c, int d) {     if (c ==  a ) return 1 * (1 - 2 * (d % 2));     if (c ==  b ) return -1 * (1 - 2 * (d % 2));     return 0;   }   int go(int d, int bitmask) {     if (bitmask == 0) {       return -100;     }     if (comp[d][bitmask]) return res[d][bitmask];     comp[d][bitmask] = true;     if (d == 2 * n - 2) {       res[d][bitmask] = 0;     } else if (d + 1 < n) {       int best = 100;       for (char x =  a ; x <=  z ; x++) {         int nbitmask = 0;         for (int j = 0; j <= d + 1; j++) {           if (T[j][d + 1 - j] != x) continue;           if ((1 << j) & bitmask) nbitmask |= (1 << j);           if ((j != 0) && ((1 << (j - 1)) & bitmask)) nbitmask |= (1 << j);         }         best = min(best, pts(x, d) - go(d + 1, nbitmask));       }       res[d][bitmask] = best;     } else {       int best = 100;       for (char x =  a ; x <=  z ; x++) {         int nbitmask = 0;         for (int j = 0; j < 2 * n - 2 - d; j++) {           if (T[2 - n + d + j][n - 1 - j] != x) continue;           if ((1 << j) & bitmask) nbitmask |= (1 << j);           if (((1 << (j + 1)) & bitmask)) nbitmask |= (1 << j);         }         best = min(best, pts(x, d) - go(d + 1, nbitmask));       }       res[d][bitmask] = best;     }     return res[d][bitmask];   }   int main() {     cin >> n;     for (int i = 0; i < n; i++) cin >> T[i];     int x = pts(T[0][0], 0) + go(0, 1);     if (x > 0) {       printf( FIRST n );     } else if (x == 0) {       printf( DRAW n );     } else {       printf( SECOND n );     }   }   