#!/bin/python import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. if i_start >= n or i_end >= n: print "Impossible" return elif i_end >= n or j_end >= n: print "Impossible" return i_dif = i_start - i_end j_dif = j_start - j_end j_chk = j_dif - i_dif / 2 if i_dif % 2 != 0 or j_chk % 2 != 0: print "Impossible" return path = [] while i_dif != 0 or j_dif != 0: while i_dif > 0 and j_dif >= 0: i_dif = i_dif - 2 j_dif = j_dif - 1 path.append(1) while i_dif > 0 and j_dif <= 0: i_dif = i_dif - 2 j_dif = j_dif + 1 path.append(2) while i_dif == 0 and j_dif < 0: j_dif = j_dif + 2 path.append(3) while i_dif < 0 and j_dif <= 0: i_dif = i_dif + 2 j_dif = j_dif + 1 path.append(4) while i_dif < 0 and j_dif >= 0: i_dif = i_dif + 2 j_dif = j_dif - 1 path.append(5) while i_dif == 0 and j_dif > 0: j_dif = j_dif - 2 path.append(6) path.sort() print len(path) for i in path: if i == 1: print "UL", if i == 2: print "UR", if i == 3: print "R", if i == 4: print "LR", if i == 5: print "LL", if i == 6: print "L", 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)