#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. if (i_start+i_end)%2 != 0: print("Impossible") return moves = [] while i_start != i_end: if i_start > i_end: i_m = "U" i_start -= 2 elif i_start < i_end: i_m = "L" i_start += 2 if j_start > j_end: j_m = "L" j_start -= 1 elif j_start < j_end: j_m = "R" j_start += 1 else: if i_m == "U": j_m = "L" j_start -= 1 else: j_m = "R" j_start += 1 moves.append("{}{}".format(i_m,j_m)) if j_start < j_end: moves.append("R") elif j_start > j_end: moves.append("L") print(len(moves)) print(" ".join(moves)) 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)