import std.stdio,std.regex,std.math,std.algorithm;

void main(){
	auto n = readln().chomp().to!size_t();
	auto list = readMulti!long(n);
	long[] list2;

	long max;
	foreach( xy ; list ){
		if( max < abs(xy[0])+abs(xy[1]) ){
			max = abs(xy[0])+abs(xy[1]);
		}
	}
	// it is impossible?
	foreach( xy ; list ){
		if( (abs(xy[0])+abs(xy[1]))%2 != max%2 ){
			
			writeln("-1");
			return;
		}
	}
	

	// possible, do it
	writeln(max);
	foreach( i ; 0..max ){
		write(1);
		if( i+1 != max ){write(" ");}
	}
	write("\n");

	foreach( xy ; list ){
		//write(xy);
		// X
		if( 0 < xy[0] ){
			foreach( x ; 0..xy[0] ) write("R");
		} else if( xy[0] < 0 ){
			foreach( x ; xy[0]..0 ) write("L");
		}
		// Y
		if( 0 < xy[1] ){
			foreach( y ; 0..xy[1] ) write("U");
		} else if( xy[1] < 0 ){
			foreach( y ; xy[1]..0 ) write("D");
		}
		// left
		foreach( i ; 0..( max - (abs(xy[0]) + abs(xy[1])) ) ){
			write( i%2==0 ? "U" : "D" );
		}
		write("\n");
	}
	
	return;
}

import std.string,std.conv;

T[] readMany( T = size_t )(){
	T[] ret;
	foreach( val; readln().chomp().split() ){
		ret ~= val.to!T();
	}
	return ret;
}
T[][] readMulti( T = size_t )( size_t lines ){
	T[][] ret;
	ret.length = lines;

	foreach( i ; 0..lines ){
		foreach( val ; readln().chomp().split() ){
			ret[i] ~= val.to!T();
		}
	}
	return ret;
}
