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