#!/bin/python import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # order UL, UR, R, LR, LL, L # Print the distance along with the sequence of moves. done = False; count = 0; moves = [] while done==False: if i_start==i_end and j_start==j_end: count-=1 done = True elif j_start<0 or i_start<0: done = True count=-1000 elif i_start>i_end+1 and j_start>j_end: moves.append("UL") i_start-=2 j_start-=1 elif i_start>i_end+1 and j_startj_end: moves.append("LL") i_start+=2 j_start-=1 elif i_start==i_end and j_start>j_end-1: moves.append("L") j_start-=2 elif j_start==j_end and i_starti_end: moves.append("UL") i_start-=2 j_start-=1 else: done = True count=-1000 #add to iteration count count+=1 #out of loop if count<=0: print("Impossible") else: print(count) print(" ".join(moves)) 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)