#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m, k;
  cin >> n >> m >> k;
  string s = "";
  for (long long i = 1; i <= n - 1; i++) {
    s.push_back('U');
  }
  for (long long i = 1; i <= m - 1; i++) {
    s.push_back('L');
  }
  for (long long i = 1; i <= n; i++) {
    if (i & 1) {
      for (long long j = 1; j <= m - 1; j++) {
        s.push_back('R');
      }
    } else {
      for (long long j = m - 1; j >= 1; j--) {
        s.push_back('L');
      }
    }
    s.push_back('D');
  }
  cout << s.size() << "\n" << s << "\n";
}
