#include <iostream>
#include <vector>

using namespace std;

typedef long long ll;

void compute(int right, int down, string curr, vector<string> &res) {
  if (right == 0 && down == 0) {
    res.push_back(curr);
	return;
  }
  if (right > 0) compute(right - 1, down, curr + "R", res);
  if (down > 0) compute(right, down - 1, curr + "D", res);
}

int main() {
  vector<string> res;
  compute(5, 5, "", res);
  cout << res.size() << endl;
  for (const string &path : res) {
    cout << path << endl;
  }
  return 0;
}
