#include<bits/stdc++.h>
typedef long long ll;
ll gi(){
	ll x=0,f=1;
	char ch=getchar();
	while(!isdigit(ch))f^=ch=='-',ch=getchar();
	while(isdigit(ch))x=x*10+ch-'0',ch=getchar();
	return f?x:-x;
}
std::mt19937 rnd(time(NULL));
#define rand rnd
#define pr std::pair<int,int>
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
template<class T>void cxk(T&a,T b){a=a>b?a:b;}
template<class T>void cnk(T&a,T b){a=a<b?a:b;}
#ifdef mod
int pow(int x,int y){
	int ret=1;
	while(y){
		if(y&1)ret=1ll*ret*x%mod;
		x=1ll*x*x%mod;y>>=1;
	}
	return ret;
}
template<class Ta,class Tb>void inc(Ta&a,Tb b){a=a+b>=mod?a+b-mod:a+b;}
template<class Ta,class Tb>void dec(Ta&a,Tb b){a=a>=b?a-b:a+mod-b;}
#endif
ll len[41],x[1001],y[1001];
int main(){
#ifdef LOCAL
	freopen("in.in","r",stdin);
	//freopen("out.out","w",stdout);
#endif
	int n=gi(),s=0;
	for(int i=1;i<=n;++i)x[i]=gi(),y[i]=gi(),s|=1<<(x[i]+y[i]&1);
	if(s==3)puts("-1"),exit(0);
	int m=0;len[++m]=1;if(s==1)len[++m]=1;
	for(int i=1;i<=31;++i)len[++m]=1ll<<i;
	std::reverse(len+1,len+m+1);
	printf("%d\n",m);for(int i=1;i<=m;++i)printf("%lld ",len[i]);puts("");
	for(int i=1;i<=n;++i){
		ll X=0,Y=0;
		for(int j=1;j<=m;++j){
			ll dL=llabs(X-len[j]-x[i])+llabs(Y-y[i]);
			ll dR=llabs(X+len[j]-x[i])+llabs(Y-y[i]);
			ll dU=llabs(X-x[i])+llabs(Y+len[j]-y[i]);
			ll dD=llabs(X-x[i])+llabs(Y-len[j]-y[i]);
			ll mn=std::min({dL,dR,dU,dD});
			if(mn==dL)X-=len[j],putchar('L');
			else if(mn==dR)X+=len[j],putchar('R');
			else if(mn==dU)Y+=len[j],putchar('U');
			else Y-=len[j],putchar('D');
		}
		assert(X==x[i]&&Y==y[i]);
		puts("");
	}
	return 0;
}

