func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n, dp[30][30];   string s;   long long ten[30];   string ans[30][30];   int main() {     cin >> n >> s;     reverse(s.begin(), s.end());     ten[0] = 1;     for (int i = 1; i <= 20; i++) ten[i] = ten[i - 1] * 10;     dp[0][0] = 0;     dp[1][0] = s[0] -  0 ;     ans[1][0] =  M ;     dp[0][1] = s[0] -  0 ;     ans[0][1] =  H ;     for (int i = 2; i <= n; i++) {       long long q = (int)s[i - 1] -  0 ;       dp[i][0] = dp[i - 1][0] + q * ten[i - 1];       ans[i][0] = ans[i - 1][0];       ans[i][0] +=  M ;       dp[0][i] = dp[0][i - 1] + q * ten[i - 1];       ans[0][i] = ans[0][i - 1];       ans[0][i] +=  H ;     }     for (int i = 1; i <= n; i++)       for (int j = 1; j <= n; j++) {         long long q = (int)s[i + j - 1] -  0 ;         long long m = dp[i - 1][j] + q * ten[i - 1];         long long h = dp[i][j - 1] + q * ten[j - 1];         if (m <= h) {           dp[i][j] = h;           ans[i][j] = ans[i][j - 1];           ans[i][j] +=  H ;         } else {           dp[i][j] = m;           ans[i][j] = ans[i - 1][j];           ans[i][j] +=  M ;         }       }     s = ans[n][n];     reverse(s.begin(), s.end());     cout << s << endl;     return 0;   }   