#!/bin/python3 import sys def dist(a, b, c, d): return abs(a - c) + abs(b - d) def pick(moves): minimum = float("inf") idx = -1 for i, m in enumerate(moves): if m < minimum: minimum = m idx = i return idx def printShortestPath(n, i_start, j_start, i_end, j_end): result = [] moveLegend = ["UL", "UR", "R", "LR", "LL", "L"] for _ in range(n): # Print the distance along with the sequence of moves. potential_moves = [(i_start - 2, j_start - 1), (i_start-2, j_start+1), (i_start, j_start+2), (i_start+2, j_start+1), (i_start+2, j_start-1), (i_start, j_start-2)] costs = map(lambda x: dist(x[0], x[1], i_end, j_end), potential_moves) best_move = pick(costs) i_start = potential_moves[best_move][0] j_start = potential_moves[best_move][1] result.append(moveLegend[best_move]) if i_start == i_end and j_start == j_end: print(len(result)) print(' '.join(result)) return print("Impossible") 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)