#!/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>=i_end and j_start>=j_end: if (j_start==j_end) and (i_start-i_end)%2==0: steps = (i_start-i_end)//2 if steps==2: print(steps) print ("UL UR") elif steps>2 and steps%4==0: print("UL UR"*(steps//4)) else: print"Imposible" elif (i_start==i_end) and (j_start-j_end)%2==0: steps = (j_start-j_end)//2 print(steps) print ("L "*steps) elif (i_start-i_end)%2==0: steps = (i_start-i_end)//2 if (j_start-steps) == j_end: print(steps) print("UL "*steps) elif ((j_start-steps)-j_end)%2 == 0: print(steps+(((j_start-steps)-j_end)//2)) print("UL "*steps+""+"L "*int(((j_start-steps)-j_end)//2)) else: print("Impossible") else: print"Impossible" elif i_start>=i_end and j_start<=j_end: if (j_start==j_end) and (i_start-i_end)%2==0: steps = (i_start-i_end)//2 if steps==2: print(steps) print ("UL UR") elif steps>2 and steps%4==0: print("UL UR"*(steps//4)) else: print"Imposible" elif (i_start==i_end) and (j_end-j_start)%2==0: steps = (j_start-j_end)//2 print(steps) print ("R "*steps) elif (i_start-i_end)%2==0 : steps = (i_start-i_end)//2 if (j_start+steps) == j_end: print(steps) print("UR "*steps) elif (j_end-(j_start+steps))%2 == 0: print(steps+((j_end-(j_start+steps))//2)) print("UR "*steps+""+"R "*int((j_end-(j_start+steps))//2)) else: print("Impossible") else: print"Impossible" elif i_start<=i_end and j_start>=j_end: if (j_start==j_end) and (i_end-i_start)%2==0: steps = (i_end-i_start)//2 if steps==2: print(steps) print ("LR LL") elif steps>2 and steps%4==0: print("LR LL"*(steps//4)) else: print"Imposible" elif (i_start==i_end) and (j_start-j_end)%2==0: steps = (j_start-j_end)//2 print(steps) print ("L "*steps) elif (i_end-i_start)%2==0 : steps = (i_end-i_start)//2 if (j_start-steps) == j_end: print(steps) print("LL "*steps) elif ((j_start-steps)-j_end)%2 == 0: print(steps+(((j_start-steps)-j_end)//2)) print("LL "*steps+""+"L "*int(((j_start-steps)-j_end)//2)) else: print("Impossible") else: print"Impossible" else: if (j_start==j_end) and (i_start-i_end)%2==0: steps = (i_end-i_start)//2 if steps==2: print(steps) print ("LR LL") elif steps>2 and steps%4==0: print("LR LL"*(steps//4)) else: print"Imposible" elif (i_start==i_end) and (j_end-j_start)%2==0: steps = (j_end-j_start)//2 print(steps) print ("R "*steps) elif (i_end-i_start)%2==0 and (j_end-j_start)%2==0: steps = (i_end-i_start)//2 if (j_start+steps) == j_end: print(steps) print("LR "*steps) elif (j_end-(j_start+steps))%2 == 0: print(steps+((j_end-(j_start+steps))//2)) print("LR "*steps+""+"L "*int((j_end-(j_start+steps))//2) ) else: print"Impossible" else: print"Impossible" 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)