#!/bin/python import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. # i is row row_difference = (i_start-i_end) col_difference = (j_start-j_end) if (row_difference % 2) != 0: # can only change row by steps of 2, so if difference is not even, cannot get there print "Impossible" return if ((row_difference/2) % 2) != (col_difference % 2): # if making an even number of up-ish or down-ish steps, the horizontal offset must be an even number # if making an odd number of ditto, ditto must be odd print "Impossible" return # order: UL, UR, R, LR, LL, L UL = -2, -1 UR = -2, 1 R = 0, 2 LR = 2, 1 LL = 2, -1 L = 0, -2 i = i_start j = j_start result = [] while i > i_end: d = None if j <= j_end: d = UR result.append("UR") else: d = UL result.append("UL") i += d[0] j += d[1] while j < j_end: result.append("R") j += R[1] while i < i_end: d = None if j <= j_end: d = LR result.append("LR") else: d = LL result.append("LL") i += d[0] j += d[1] while j > j_end: result.append("L") j += L[1] print str(result.__len__()) print " ".join(result) if __name__ == "__main__": n = int(raw_input().strip()) i_start, j_start, i_end, j_end = raw_input().strip().split(' ') i_start, j_start, i_end, j_end = [int(i_start), int(j_start), int(i_end), int(j_end)] printShortestPath(n, i_start, j_start, i_end, j_end)