#include <bits/stdc++.h>
#pragma GCC optimize(1)
#pragma GCC optimize(2)
#pragma GCC optimize(3, "Ofast", "inline")
using namespace std;
const int maxn = 2e2 + 7;
const int INF = 1e9;
const long long INFF = 1e18;
int n, m, k, x;
int main() {
  scanf("%d%d%d", &n, &m, &k);
  string str = "";
  for (int j = 1; j <= 4; j++)
    for (int i = 1; i <= k; i++) scanf("%d", &x);
  for (int i = 1; i <= m - 1; i++) str += 'L';
  for (int i = 1; i <= n - 1; i++) str += 'U';
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 1) {
      for (int j = 1; j <= m - 1; j++) str += 'R';
      str += 'D';
    } else {
      for (int j = 1; j <= m - 1; j++) str += 'L';
      str += 'D';
    }
  }
  cout << str.size() << endl << str << endl;
}
