func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long N = 100;   long long n, m, dp[N][N], a[N][N], b[N][N], c[N], len;   char go[N][N][N];   char str[N << 1];   inline long long read() {     long long sym = 0, res = 0;     char ch = 0;     while (!isdigit(ch)) sym |= (ch ==  - ), ch = getchar();     while (isdigit(ch)) res = (res << 3) + (res << 1) + (ch ^ 48), ch = getchar();     return sym ? -res : res;   }   void file() {     freopen( read.in ,  r , stdin);     freopen( write.out ,  w , stdout);   }   long long power(long long a, long long x) {     long long res = 1;     while (x) {       if (x & 1) res *= a;       a *= a;       x >>= 1;     }     return res;   }   void write(long long now, long long x, long long y, char ch) {     if (now == 0) {       printf( %c , ch);       return;     }     if (go[now][x][y] ==  H )       write(now - 1, x - 1, y,  H );     else       write(now - 1, x, y - 1,  M );     if (now != len) printf( %c , ch);   }   signed main() {     n = read();     len = n << 1;     scanf( %s , str + 1);     for (long long i = 1; i <= len; i++) {       c[i] = str[i] -  0 ;     }     for (long long i = 1; i <= n; i++) {       a[i][i] = a[i - 1][i - 1] + c[i] * power(10, n - i);       go[i][i][0] =  H ;       b[i][i] = b[i - 1][i - 1] + c[i] * power(10, n - i);       go[i][0][i] =  M ;     }     for (long long i = 1; i <= len; i++) {       for (long long j = max(i - n, 1ll); j <= min(i - 1ll, n); j++) {         long long k = i - j, ta = c[i] * power(10, n - j),                   tb = c[i] * power(10, n - k);         if (a[i - 1][j - 1] + ta + b[i - 1][k] >             b[i - 1][k - 1] + tb + a[i - 1][j]) {           a[i][j] = a[i - 1][j - 1] + ta;           b[i][k] = b[i - 1][k];           go[i][j][k] =  H ;         } else {           b[i][k] = b[i - 1][k - 1] + tb;           a[i][j] = a[i - 1][j];           go[i][j][k] =  M ;         }       }     }     write(len, n, n,    );     return 0;   }   