import std.stdio, std.string, std.range, std.conv, std.array, std.algorithm, std.math, std.typecons;

void main() {
    auto N = readln.chomp.to!long;
    alias Point = Tuple!(long, long);
    Point[] pointList;
    foreach (i; 0..N) {
        auto tmp = readln.split.to!(long[]);
        auto x = tmp[0], y = tmp[1];
        pointList ~= Point(x,y);
    }

    if (!pointList.map!(p => abs(p[0] + p[1]) % 2).all!(a => abs(pointList[0][0] + pointList[0][1]) % 2 == a)) {
        writeln(-1);
        return;
    }
    bool odd = abs(pointList[0][0] + pointList[0][1]) % 2 == 1;

    enum M = 31;
    writeln(M);

    M.iota.map!(i => (2^^i).to!string).join(" ").writeln;

    foreach (i; 0..N) {
        const p = pointList[i];
        auto u = (p[0] + p[1] + 2^^M-1 - (odd ? 0 : 1)) / 2;
        auto v = (p[0] - p[1] + 2^^M-1 - (odd ? 0 : 1)) / 2;
        foreach (j; 0..M) {
            if (u&1) {
                if (v&1) {
                    write("R");
                } else {
                    write("U");
                }
            } else {
                if (v&1) {
                    write("D");
                } else {
                    write("L");
                }
            }
            u >>>= 1;
            v >>>= 1;
        }
        writeln;
    }
}

