#!/bin/python3 from collections import defaultdict import sys N = 0 def minuser(): return -1 DP = defaultdict(minuser) def findPath(x,y,cost,moves): if(y%2!=0 or (x%2==1 and y==0)): print("Impossible") elif(x==0 and y == 0): print(cost) nstr="" priors=[] moves = sorted(moves)[::-1] for elem in moves: nstr+=elem+" " print(nstr) elif(x<0 and y<-1): moves.append("UL") findPath(x+1,y+2,cost+1,moves) elif(x>0 and y<-1): moves.append("UR") findPath(x-1,y+2,cost+1,moves) elif(x>0 and y==0): moves.append("R") findPath(x-2,y,cost+1,moves) elif(x>0 and y>1): moves.append("LR") findPath(x-1,y-2,cost+1,moves) elif(x<0 and y>1): moves.append("LL") findPath(x+1,y-2,cost+1,moves) elif(x<0 and y==0): moves.append("L") findPath(x+2,y,cost+1,moves) elif(y>1): moves.append("LR") findPath(x-1,y-2,cost+1,moves) elif(y<-1): moves.append("UL") findPath(x-1,y+2,cost+1,moves) def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. x= i_end-i_start y= j_end-j_start findPath(y,x,0,[]) 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)