#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < 2 * k; i++) {
    int a, b;
    cin >> a >> b;
  }
  if (n == 1 && m == 1) {
    cout << 0;
    return 0;
  } else if (n == 1) {
    cout << 2 * m << "\n";
    for (int i = 0; i < m; i++) {
      cout << "R";
    }
    for (int i = 0; i < m; i++) {
      cout << "L";
    }
    return 0;
  } else if (m == 1) {
    cout << 2 * n << "\n";
    for (int i = 0; i < n; i++) {
      cout << "U";
    }
    for (int i = 0; i < n; i++) {
      cout << "D";
    }
    return 0;
  }
  cout << m + n - 2 + m * n + n << "\n";
  for (int i = 0; i < n - 1; i++) cout << "U";
  for (int i = 0; i < m - 1; i++) cout << "L";
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      for (int j = 0; j < m; j++) {
        cout << "R";
      }
    } else {
      for (int j = 0; j < m; j++) {
        cout << "L";
      }
    }
    cout << "D";
  }
  return 0;
}
