#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;

int main() {
  int sx, sy, tx, ty;
  cin >> sx >> sy >> tx >> ty;
  const int dx = tx - sx, dy = ty - sy;

  // print string(how many, what)
  cout << string(dy, 'U') << string(dx, 'R');  // path 1 (s->t)
  cout << string(dy, 'D') << string(dx, 'L');  // path 2 (t->s)
  cout << 'L' << string(dy+1, 'U') << string(dx+1, 'R') << 'D';  // path 3 (s->t)
  cout << 'R' << string(dy+1, 'D') << string(dx+1, 'L') << 'U';  // path 4 (t->s)
  cout << endl;
}
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define sz(x) (int)(x).size()
#define uni(x) x.erase(unique(rng(x)),x.end())
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define EPS (1e-10)
#define equals(a, b) (fabs((a)-(b)) < EPS)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef set<int> S;
typedef queue<int> Q;
typedef queue<P> QP;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
const int MOD = 1000000007;
  
int main() {
  v(string) cmd(3);
  rep(i,3) {
    cin >> cmd[i];
  }
  vi pos(3,0);
  int now=0;
  while(1) {
    if(pos[now]>=sz(cmd[now])) {
      cout << char(now+'A') << endl;
      return 0;
    }
    int next = cmd[now][pos[now]]-'a';
    pos[now]++;
    now=next;
  }

  return 0;
}