#!/bin/python3 import sys def check(string): la = [x for x in string.split()] la.sort(reverse = True) return ' '.join(la) def printShortestPath(n, i_start, j_start, i_end, j_end): if (abs(i_start - i_end) % 2 == 1) or (j_start == j_end and (i_start - i_end)%2 == 1): print("Impossible") return count = 0 string = "" while(i_start != i_end and i_start < n and j_start < n): if i_start > i_end: if j_start > j_end: count+=1 string+="UL " j_start -= 1 i_start -= 2 else: count+=1 string+="UR " j_start += 1 i_start -= 2 else: if j_start > j_end: count+=1 string+="LL" j_start -= 1 i_start += 2 else: count+=1 string+="LR " j_start += 1 i_start += 2 while(j_start != j_end and i_start < n and j_start < n): if j_start > j_end: j_start-=2 count+=1 string+="L " else: j_start+=2 count+=1 string+="R " if i_start >= n or j_start >= n: print("Impossible") else: string = check(string) print(str(count)+'\n'+string) 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)