n = int(input()) l = [int(t) for t in input().split()] s,m = '',10**5 def sl(n,x,y,u,v,c,k): dp = [[-1]*n for i in range(n)] p = list(range(n)) if c == 0 or x not in p or y not in p: return 10**5 if dp[x][y] != -1: return dp[x][y] if x == u and y == v: global s,m if len(k.split()) < m: s = k m = len(k.split()) return 0 dp[x][y] = min(1+sl(n,x-2,y-1,u,v,c-1,k+'UL '),1+sl(n,x-2,y+1,u,v,c-1,k+'UR '),1+sl(n,x,y+2,u,v,c-1,k+'R '),1+sl(n,x+2,y+1,u,v,c-1,k+'LR '),1+sl(n,x+2,y-1,u,v,c-1,k+'LL '),1+sl(n,x,y-2,u,v,c-1,k+'L ')) return dp[x][y] z = sl(n,l[0],l[1],l[2],l[3],n-2,'') if s == '': print('Impossible') else: print(z) print(s.strip())