#!/bin/python3 import sys s = "" i = 0 def printShortestPath(n, i_start, j_start, i_end, j_end,first=True): global i global s print(s,file=sys.stderr) if(i_start == i_end and j_start == j_end): print(i) print(s) return i+= 1 if(first): s+=" " if((i_start - i_end) % 2 == 1): s+="Impossible" print(s) return elif(((i_start - i_end)/2 % 2) != ((j_start - j_end) % 2)): s+="Impossible" print(s) return elif(i_start > i_end): if(j_start > 0 and (j_end - j_start + 1 <= (i_start - i_end)/2)): s+="UL" printShortestPath(n,i_start - 2, j_start - 1, i_end, j_end) elif(j_start < n and (j_start - j_end + 1 <= (i_start - i_end)/2)): s+="UR" printShortestPath(n,i_start - 2, j_start + 1, i_end, j_end) elif(j_end - j_start > (i_end - i_start)/2): s+="R" printShortestPath(n, i_start, j_start + 2, i_end, j_end) elif(i_start < i_end): if(j_start < n and (j_start - j_end + 1 <= (i_end - i_start)/2)): s+="LR" printShortestPath(n,i_start + 2, j_start + 1, i_end, j_end) elif(j_start > 0 and (j_end - j_start + 1 <= (i_end - i_start)/2)): s+="LL" printShortestPath(n,i_start + 2, j_start - 1, i_end, j_end) else: s+="L" printShortestPath(n,i_start,j_start - 2, i_end, j_end) if __name__ == "__main__": n = int(input().strip()) i_start, j_start, i_end, j_end = 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,False)