#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # UL (-1,-2), UR (1,-2), R (2, 0), LR (1, 2), LL (-1, 2), L (-2, 0) moves = 0 UL, UR, R, LR, LL, L = 0, 0, 0, 0, 0, 0 v = i_start - i_end h = j_start - j_end def move(): nonlocal h, v, moves, UL, UR, R, LR, LL, L while h >= 0 and v > 0: UL += 1 v -= 2 h -= 1 moves += 1 while h < 0 and v > 0: UR += 1 v -= 2 h += 1 moves += 1 while h < 0 and v == 0: R += 1 h += 2 moves += 1 while h <= 0 and v < 0: LR += 1 v += 2 h += 1 moves += 1 while h > 0 and v < 0: LL += 1 v += 2 h -= 1 moves += 1 while h > 0 and v == 0: L += 1 h -= 2 moves += 1 if abs(v) % 2 == 1: print('Impossible') elif h % 2 != (v/2) % 2: print('Impossible') else: while (h, v) != (0, 0): move() print(moves) print('UL '*UL + 'UR '*UR + 'R '*R + 'LR '*LR + 'LL '*LL +'L '*L) 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)