func_code_string: #include <bits/stdc++.h>   int max(int a, int b) {     if (a > b) return a;     return b;   }   int min(int a, int b) {     if (a < b)       return a;     else       return b;   }   char s1[600000], s2[600000];   int z[600000], y[600000];   struct student {     int l;     int r;   } a[600000];   int main() {     int i;     int n, m, p;     int j;     scanf( %d%d%d , &n, &m, &p);     for (i = 0; i <= n + 1; i++) {       a[i].l = i - 1;       a[i].r = i + 1;     }     getchar();     gets(s1 + 1);     gets(s2 + 1);     int num = 0;     int len = strlen(s1 + 1);     for (i = 1; i <= len; i++) {       if (s1[i] ==  ( )         z[num++] = i;       else {         y[z[--num]] = i;         y[i] = z[num];       }     }     len = strlen(s2 + 1);     for (i = 1; i <= len; i++) {       if (s2[i] ==  R )         p = a[p].r;       else if (s2[i] ==  L )         p = a[p].l;       else {         a[a[max(p, y[p])].r].l = a[min(p, y[p])].l;         a[a[min(p, y[p])].l].r = a[max(p, y[p])].r;         a[min(p, y[p])].r = a[max(p, y[p])].r;         p = a[p].r;       }       if (p < 1) p = a[p].r;       if (p > n) p = a[p].l;     }     for (i = a[0].r; i <= n; i = a[i].r) {       printf( %c , s1[i]);     }     printf(  n );     return 0;   }   