#include<iostream>
using namespace std;

class Solver {
private:
    int sy, sx, gy, gx, result;
    string ans;
public:
    void input() {
        cin >> sy >> sx >> gy >> gx;
        ans = "";
    }

    void output() {
        cout << ans << endl;
    }

    void getResult() {
        cin >> result;
    }

    void solve() {
        if(sy < gy) for(int i = 0; i < gy - sy; i++) ans += "D";
        else for(int i = 0; i < sy - gy; i++) ans += "U";
        if(sx < gx) for(int i = 0; i < gx - sx; i++) ans += "R";
        else for(int i = 0; i < sx - gx; i++) ans += "L";
    }

    void play() {
        for(int i = 0; i < 1000; i++) {
            input();
            solve();
            output();
            getResult();
        }
    }
};

int main()
{
    Solver solver;
    solver.play();
    return 0;
}
//By: Luogu@rui_er(122461)
#include <bits/stdc++.h>
#define rep(x,y,z) for(int x=y;x<=z;x++)
#define per(x,y,z) for(int x=y;x>=z;x--)
#define debug printf("Running %s on line %d...\n",__FUNCTION__,__LINE__)
using namespace std;
typedef long long ll;
const int N = 1e5+5;

int n, ans; char s[N];
template<typename T> void chkmin(T &x, T y) {if(x > y) x = y;}
template<typename T> void chkmax(T &x, T y) {if(x < y) x = y;}

int main() {
	scanf("%d%s", &n, s+1);
	if(s[1] != s[n]) return puts("1")&0;
	rep(i, 1, n-1) if(s[1] != s[i] && s[i+1] != s[n]) return puts("2")&0;
	puts("-1");
	return 0;
}