#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, f, g, i, j, ans = 0, d;
  cin >> n >> m >> k;
  for (i = 1; i <= 2 * k; i++) {
    cin >> f >> g;
  }
  cout << (n - 1 + m - 1 + m - 1 + (n - 1) * (m)) << endl;
  for (i = 0; i < n - 1; i++) {
    cout << "U";
  }
  for (i = 0; i < m - 1; i++) {
    cout << "L";
  }
  for (i = 0; i <= m - 1; i++) {
    if (i % 2 == 0) {
      for (j = 0; j < n - 1; j++) {
        cout << "D";
      }
    } else {
      for (j = 0; j < n - 1; j++) {
        cout << "U";
      }
    }
    if (i != m - 1) cout << "R";
  }
  cout << endl;
}
