func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n;     cin >> n;     string s;     cin >> s;     int a[1001];     for (int i = 0; i < n; i++) a[i] = s[i] -  0 ;     for (int i = 0; i < n; i++) {       int b[1001];       for (int j = i; j < n; j++) {         if (a[j] >= a[i])           b[j - i] = a[j] - a[i];         else           b[j - i] = 10 + a[j] - a[i];       }       for (int j = 0; j < i; j++) {         if (a[j] >= a[i])           b[n - i + j] = a[j] - a[i];         else           b[n - i + j] = 10 + a[j] - a[i];       }       string z;       for (int k = 0; k < n; k++) {         z += b[k] +  0 ;       }       if (s.compare(z) > 0) {         s = z;       }     }     cout << s << endl;     return 0;   }   