#!/bin/python import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. # rule out all impossible solutions if (abs(i_start - i_end) % 2 != 0) | ((abs(i_start - i_end) % 4 == 0) & (abs(j_start - j_end) % 2 != 0)): # | ((abs((i_start + 2) - (i_end + 2)) % 4 == 0) & (abs(j_start - j_end) % 2 == 0)): print "Impossible" else: path = [] steps = 0 i_loc = i_start j_loc = j_start while (i_loc != i_end) | (j_loc != j_end): if i_loc > i_end: if j_loc >= j_end: path.append("UL") steps += 1 i_loc -= 2 j_loc -= 1 elif j_loc < j_end: path.append("UR") steps += 1 i_loc -= 2 j_loc += 1 elif (i_loc == i_end) & (j_loc < j_end): path.append("R") steps += 1 j_loc += 2 elif i_loc < i_end: if j_loc <= j_end: path.append("LR") steps += 1 i_loc += 2 j_loc += 1 elif j_loc > j_end: path.append("LL") steps += 1 i_loc += 2 j_loc -= 1 elif (i_loc == i_end) & (j_loc > j_end): path.append("L") steps += 1 j_loc -= 2 print steps for step in path: print step, 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)