#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. board = [[[] for _ in range(n)] for _ in range(n)] start = [i_start, j_start] end = [i_end, j_end] dist = [y - x for y, x in zip(start, end)] if not dist[0] % 2 == 0: print('Impossible') return ud_moves = int(dist[0] / 2) if not (dist[1] + ud_moves) % 2 == 0: print('Impossible') return moves = {(-2, -1):'UL', (-1, 1):'UR', (0, 2):'R', (2, 1):'LR', (2, -1):'LL', (0, -2):'L'} move_changes = list(moves.keys()) total_moves = [] while any(abs(i) > 0 for i in dist): move = [[],dist] for poss in move_changes[::-1]: if abs(poss[0] + dist[0]) + abs(poss[1] + dist[1]) < sum(map(abs, move[1])): move = [poss, [x + y for x, y in zip(dist, poss)]] total_moves.append(moves[tuple(move[0])]) dist = move[1] print(len(total_moves)) print(' '.join(total_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)