#!/bin/python3 import sys moves=["UL","UR","R","LR","LL","L"] coords=[(-2,-1),(-2,1),(0,2),(2,1),(2,-1),(0,-2)] def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. if (i_end-i_start)&1: print("Impossible") else: path=[] dist=abs(i_start-i_end)//2 i=i_start j=j_start for d in range(dist): if ii_end: if j>=j_end: path.append("UL") i-=2 j-=1 else: path.append("UR") i-=2 j+=1 if j!=j_end: dist=abs(j-j_end) if dist&1: print("Impossible") return for d in range(dist): if jj_end: path.append("L") j-=2 print(len(path)) print(" ".join(sorted(path, key=moves.index))) 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)