#include <bits/stdc++.h>
const double PI = 3.141592653589793238460;
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<char> v;
  for (int i = 1; i <= n - 1; i++) v.push_back('U');
  for (int i = 1; i <= m - 1; i++) v.push_back('L');
  for (int i = 1; i <= n; i++) {
    if (i % 2) {
      for (int j = 2; j <= m; j++) {
        v.push_back('R');
      }
      if (i < n) v.push_back('D');
    } else {
      for (int j = m - 1; j >= 1; j--) {
        v.push_back('L');
      }
      if (i < n) v.push_back('D');
    }
  }
  cout << v.size() << '\n';
  for (char ch : v) cout << ch;
}
