#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

const int MOD = 1e9 + 7;
const int iINF = 1000000000;
const long long int llINF = 1000000000000000000;

using namespace std;
using ll = long long int;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;
using edge = struct {
  int to;
  int cost;
};
#define REP(i, n) for (ll i = 0; i < (n); i++)
#define RREP(i, n) for (ll i = (n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define AUTO(i, m) for (auto &i : m)
#define ALL(a) (a).begin(), (a).end()
#define MAX(vec) *std::max_element(vec.begin(), vec.end())
#define MIN(vec) *std::min_element(vec.begin(), vec.end())
#define ARGMAX(vec)                                                            \
  std::distance(vec.begin(), std::max_element(vec.begin(), vec.end()))
#define ARGMIN(vec)                                                            \
  std::distance(vec.begin(), std::min_element(vec.begin(), vec.end()))
#define BIT(n, num) std::bitset<(n)>((num)).to_string()
#define REV(T) greater<T>()
#define PQ(T) priority_queue<T, vector<T>, greater<T>>
#define VVL(a, b, c) vector<vector<ll>>(a, vector<ll>(b, c))
#define VVVL(a, b, c, d)                                                       \
  vector<vector<vector<ll>>>(a, vector<vector<ll>>(b, vector<ll>(c, d)))

typedef pair<ll, ll> pll;
bool paircomp(const pll &a, const pll &b) {
  if (a.first == b.first)
    return a.second < b.second;
  return a.first < b.first;
}

ll POW(ll n, ll m) {
  if (m == 0) {
    return 1;
  } else if (m % 2 == 0) {
    ll tmp = POW(n, m / 2);
    return (tmp * tmp) % MOD;
  } else {
    return (n * POW(n, m - 1)) % MOD;
  }
}

int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll N = 0, check = 0;
  bool ok = false;
  cin >> N;
  vector<ll> X(N, 0), Y(N, 0);
  REP(i, N) {
    cin >> X[i] >> Y[i];
    if (i != 0 && (check + X[i] + Y[i]) % 2 != 0) {
      ok = true;
    }
    if (i == 0)
      check = (X[i] + Y[i]) % 2;
  }
  if (ok) {
    cout << -1 << endl;
    return 0;
  }
  ll m = 31;
  vector<ll> D(m + 1, 0);
  if (check % 2 == 0) {
    m = 32;
    REP(i, m - 1) D[i] = 1LL << (m - 2 - i);
    D[31] = 1;
  } else {
    REP(i, m) D[i] = 1LL << (m - 1 - i);
  }
  cout << m << endl;
  REP(i, m) { cout << D[i] << " "; }
  cout << endl;

  REP(i, N) {
    ll U = X[i] + Y[i];
    ll V = X[i] - Y[i];
    ll ud = 0, vd = 0;
    ll sumU = 0, sumV = 0;
    REP(i, m) {
      if (sumU <= U) {
        sumU += D[i];
        ud = 1;
      } else {
        sumU -= D[i];
        ud = -1;
      }
      if (sumV <= V) {
        sumV += D[i];
        vd = 1;
      } else {
        sumV -= D[i];
        vd = -1;
      }
      if (ud == 1 && vd == 1)
        cout << 'R';
      else if (ud == 1 && vd == -1)
        cout << 'U';
      else if (ud == -1 && vd == -1)
        cout << 'L';
      else
        cout << 'D';
    }
    // cout << sumU << "," << sumV << endl;
    cout << endl;
  }
  return 0;
}


Measured memory_bytes: 256