#include <bits/stdc++.h>
using namespace std;
const int inf = 2147483647;
const double PI = acos(-1.0);
const double e = 2.718281828459;
const int mod = 1000000007;
#pragma comment(linker, "/STACK:102400000,102400000")
char s[500005], x[500005];
set<int> st;
struct node {
  int id;
  char str;
} w;
vector<node> vc;
vector<int> mp[500005];
int vis[500005];
int main() {
  int n, m, p, i, j;
  while (cin >> n >> m >> p) {
    scanf("%s%s", s + 1, x);
    vc.clear();
    st.clear();
    for (i = 1; s[i]; ++i) {
      st.insert(i);
      w.id = i;
      w.str = s[i];
      if (vc.size() == 0)
        vc.push_back(w);
      else {
        node q = vc.back();
        if (q.str != s[i]) {
          mp[q.id].push_back(i);
          mp[i].push_back(q.id);
          vc.pop_back();
        } else {
          vc.push_back(w);
        }
      }
    }
    memset(vis, 0, sizeof(vis));
    int pos = p;
    for (i = 0; x[i]; ++i) {
      if (x[i] == 'R') {
        int pp = pos;
        pos = *st.lower_bound(pos + 1);
      } else if (x[i] == 'L') {
        int pp = pos;
        pos = *(--st.lower_bound(pos));
      } else if (x[i] == 'D') {
        int end = *st.rbegin();
        for (int j = min(pos, mp[pos][0]); j <= max(pos, mp[pos][0]); ++j) {
          while (vis[j]) j = max(mp[j][0], j) + 1;
          st.erase(j);
        }
        vis[pos] = 1;
        vis[mp[pos][0]] = 1;
        if (mp[pos][0] == end || pos == end) {
          pos = *st.rbegin();
        } else {
          pos = *st.lower_bound(pos + 1);
        }
      }
    }
    for (i = 1; s[i]; ++i) {
      if (!vis[i])
        printf("%c", s[i]);
      else {
        i = mp[i][0];
      }
    }
    printf("\n");
  }
}
