import java.util.*
import kotlin.*

import java.io.InputStream
import java.lang.NumberFormatException
import java.lang.StringBuilder


fun main(args: Array<String>) {
    Program().solve()
}

class Program {
    fun solve() {
        val sc = FastScanner()
        val n = sc.nextInt()
        val xy = (1..n).map { sc.nextLong() to sc.nextLong() }

        // 全部のx[i] + y[i]の偶奇が一致しないといけない


        // 現在 アームが (x[i, y[i])にある x+yをU x-yをVとする
        // アームをR U + d V + d
        //        L U - D V - d
        //        U U + D V - D
        //        D U - D V + D
        // u,vを全部奇数とする
        // 偶数なら適当に長さ1のアームを追加すれば奇数にできる

        // 全部+ にして i-1bit目を-にすると 合計が ibit目が折れる
        // 奇数なので0bit目を折る必要はない

        val sb = StringBuilder()
        if ((xy[0].first + xy[0].second) % 2 == 0L) {
            val m = 35
            sb.appendln(m)
            sb.appendln((0 until m).map { if (it == m - 1) 1 else 1L shl it }.joinToString(" "))
            for (t in 0 until n) {
                val w = CharArray(m)
                w[m - 1] = 'R'
                val u = xy[t].first + xy[t].second - 1
                val v = xy[t].first - xy[t].second - 1
                if (u % 2 == 0L) {
                    println("-1")
                    return
                }
                for (i in 0 until m - 1) {
                    val a = i == m - 2
                    val nextBit = 1L shl (i + 1)
                    // uが+か
                    val uu = (u < 0) xor (a || (Math.abs(u) and nextBit) > 0L)
                    // vが+か
                    val vv = (v < 0) xor (a || (Math.abs(v) and nextBit) > 0L)
                    w[i] = if (uu) {
                        if (vv) {
                            'R'
                        } else {
                            'U'
                        }
                    } else {
                        if (vv) {
                            'D'
                        } else {
                            'L'
                        }
                    }
                }
                sb.appendln(String(w))
            }
        } else {
            // 奇数
            val m = 35
            sb.appendln(m)
            sb.appendln((0 until m).map { 1L shl it }.joinToString(" "))
            for (t in 0 until n) {
                val w = CharArray(m)
                val u = xy[t].first + xy[t].second
                val v = xy[t].first - xy[t].second

                if (u % 2 == 0L) {
                    println("-1")
                    return
                }

                for (i in 0 until m) {
                    val a = i == m - 1
                    val nextBit = 1L shl (i + 1)
                    // uが+か
                    val uu = (u < 0) xor (a || (Math.abs(u) and nextBit) > 0)
                    // vが+か
                    val vv = (v < 0) xor (a || (Math.abs(v) and nextBit) > 0)

                    w[i] = if (uu) {
                        if (vv) {
                            'R'
                        } else {
                            'U'
                        }
                    } else {
                        if (vv) {
                            'D'
                        } else {
                            'L'
                        }
                    }
                }

                sb.appendln(String(w))
            }
        }

        println(sb.toString())
    }
}

class FastScanner {
    companion object {
        val input: InputStream = System.`in`
        val buffer = ByteArray(1024) { 0 }
        fun isPrintableChar(c: Int): Boolean = c in 33..126
    }

    var ptr = 0
    var buflen = 0
    private fun hasNextByte(): Boolean {
        if (ptr < buflen) {
            return true
        } else {
            ptr = 0
            buflen = input.read(buffer)
            if (buflen <= 0) {
                return false
            }
        }
        return true
    }

    private fun readByte(): Int = if (hasNextByte()) buffer[ptr++].toInt() else -1

    private fun skipUnprintable() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr].toInt())) ptr++
    }

    fun hasNext(): Boolean {
        skipUnprintable()
        return hasNextByte()
    }

    fun next(): String {
        if (!hasNext()) throw NoSuchElementException()
        val sb = StringBuilder()
        var b = readByte()
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b)
            b = readByte()
        }
        return sb.toString()
    }

    fun nextInt(): Int {
        if (!hasNext()) throw NoSuchElementException()
        var n = 0
        var b = readByte()
        // '-' = 45
        val minus = b == 45
        if (minus) {
            b = readByte()
        }

        // '0' = 48 '9' = 57
        if (b !in 48..57) {
            throw NumberFormatException()
        }

        while (true) {
            if (b in 48..57) {
                n *= 10
                n += b - 48
            } else if (b == -1 || !isPrintableChar(b)) {
                return if (minus) -n else n
            } else {
                throw NumberFormatException()
            }
            b = readByte()
        }
    }

    fun nextLong(): Long {
        if (!hasNext()) throw NoSuchElementException()
        var n = 0L
        var b = readByte()
        // '-' = 45
        val minus = b == 45
        if (minus) {
            b = readByte()
        }

        // '0' = 48 '9' = 57
        if (b !in 48..57) {
            throw NumberFormatException()
        }

        while (true) {
            if (b in 48..57) {
                n *= 10
                n += b - 48
            } else if (b == -1 || !isPrintableChar(b)) {
                return if (minus) -n else n
            } else {
                throw NumberFormatException()
            }
            b = readByte()
        }
    }

    fun nextDouble(): Double = next().toDouble()
}


Measured memory_bytes: 34472