#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): if (i_end - i_start) % 2 == 1 or (j_start - j_end + (i_end - i_start) // 2) % 2 != 0: print('Impossible') return moves = ['UL', 'UR', 'R', 'LR', 'LL', 'L'] steps = [] i, j = i_start, j_start while True: if i == i_end and j == j_end: break di = i_end - i dj = j_end - j if di < 0 and 2 * dj < -di: i -= 2 if j - 2 >= 0: j -= 1 steps.append(0) else: j += 1 steps.append(1) continue if di < 0 and 2 * dj >= -di: i -= 2 j += 1 steps.append(1) continue if di >= 0 and 2 * dj > di: j += 2 steps.append(2) continue if di > 0 and 2 * dj <= di: i += 2 if j + 2 < n: j += 2 steps.append(3) else: j -= 2 steps.append(4) continue if di > 0 and -2 * dj >= di: i += 2 j -= 1 steps.append(4) continue if di == 0 and dj < 0: j -= 2 steps.append(5) print(len(steps)) for step in steps: print(moves[step], end = ' ') 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)