#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, k;
  cin >> n >> k;
  if ((n - k) % 2 == 0 && n >= k * k)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
void bsolve() {
  int n;
  cin >> n;
  bool was[n];
  for (bool &w : was) w = false;
  int answer = -1;
  for (int i = 0; i < n; ++i) {
    int c;
    cin >> c;
    bool flag = false;
    for (int j = 0; j < c; ++j) {
      int a;
      cin >> a;
      a--;
      if (!was[a] && !flag) {
        was[a] = true;
        flag = true;
      }
    }
    if (!flag) answer = i;
  }
  if (answer < 0)
    cout << "OPTIMAL" << endl;
  else {
    int found = -1;
    for (int i = 0; i < n; ++i) {
      if (!was[i]) {
        found = i;
        break;
      }
    }
    cout << "IMPROVE" << endl << answer + 1 << ' ' << found + 1 << endl;
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  string s = "";
  for (int i = 0; i < n - 1; ++i) s += 'U';
  for (int j = 0; j < m - 1; ++j) s += 'L';
  for (int k = 0; k < n; ++k) {
    for (int i = 0; i < m - 1; ++i) {
      if (k % 2 == 0)
        s += 'R';
      else
        s += 'L';
    }
    if (k != n - 1) s += 'D';
  }
  cout << s.length() << endl << s;
}
