func_code_string: #include <bits/stdc++.h>   using namespace std;   int dx[] = {1, -1, 0, 0};   int dy[] = {0, 0, -1, 1};   void arquivo() {     freopen(  ,  r , stdin);     freopen(  ,  w , stdout);   }   const int N = 505050;   struct no {     int l, r;     int op;     no(){};     no(int a, int b, int c) {       op = a;       l = b;       r = c;     }   };   no vet[N];   int n, m, p;   char s[N];   inline void print() {     p = vet[0].r;     while (p != n + 1) {       printf( %c , vet[p].op == 1 ?  (  :  ) );       p = vet[p].r;     }     printf(  n );   }   inline void goRemove() {     int p1 = p;     int p2 = p;     int qtd = vet[p1].op;     while (qtd > 0) {       p2 = vet[p2].r;       qtd += vet[p2].op;     }     while (qtd < 0) {       p2 = vet[p2].l;       qtd += vet[p2].op;     }     int esq = min(p1, p2);     int dir = max(p1, p2);     esq = vet[esq].l;     dir = vet[dir].r;     vet[esq].r = dir;     vet[dir].l = esq;     if (dir != n + 1)       p = dir;     else       p = esq;   }   int main() {     scanf( %d %d %d , &n, &m, &p);     vet[0].r = 1;     vet[0].l = 0;     for (int i = 1; i <= n; ++i) {       char c;       scanf(  %c , &c);       if (c ==  ( )         vet[i] = no(1, i - 1, i + 1);       else         vet[i] = no(-1, i - 1, i + 1);     }     vet[n + 1].l = n;     vet[n + 1].r = n + 1;     scanf(  %s , s);     int len = strlen(s);     for (int i = 0; i < len; ++i) {       if (s[i] ==  L )         p = vet[p].l;       else if (s[i] ==  R )         p = vet[p].r;       else         goRemove();     }     print();     return 0;   }   