#include <bits/stdc++.h>   using namespace std;   const long long inf = 1e10;   void solve() {     long long n, m, k;     cin >> n >> m >> k;     long long moves = (n + m - 2) + (n * m) - 1;     for (long long i = 0; i < m + n; i++) {       cin >> k;     }     cout << moves <<   n ;     for (long long i = 0; i < n - 1; i++) {       cout <<  U ;     }     for (long long i = 0; i < m - 1; i++) {       cout <<  L ;     }     string r(m - 1,  R );     string l(m - 1,  L );     for (long long i = 0; i < n; i++) {       if (i % 2) {         cout << l;       } else         cout << r;       if (i != n - 1) cout <<  D ;     }     cout <<   n ;   }   int32_t main() {     std::ios::sync_with_stdio(false);     std::cin.tie(nullptr);     long long t = 1;     while (t--) solve();     return 0;   }   