#include <bits/stdc++.h>
using namespace std;
double pi = 2 * acos(0.0);
int main() {
  int n, m, k, x, y;
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    cin >> x >> y;
  }
  for (int i = 0; i < k; i++) {
    cin >> x >> y;
  }
  string s = "";
  for (int i = 0; i < m - 1; i++) {
    s += "L";
  }
  for (int i = 0; i < n - 1; i++) {
    s += "U";
  }
  bool dir = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m - 1; j++) {
      if (dir) {
        s += "R";
      } else
        s += "L";
    }
    if (i < n - 1) s += "D";
    dir = !dir;
  }
  if (s.size() > 2 * n * m)
    cout << "-1\n";
  else
    cout << s.size() << "\n" << s << "\n";
}
