#!/bin/python3 import sys def isValidMove(i, j, n): return (i >= 0 and i < n and j >= 0 and j < n) #UL, UR, R, LR, LL, L def printShortestPath(n, i_start, j_start, i_end, j_end): if(i_start % 2 != i_end % 2 or (j_start + abs(i_start - i_end) / 2) % 2 != j_end % 2): print("Impossible") return moves = [["", i_start, j_start, 0]] final = False finalCount = 0 potentialMoves = [] while(True): if(final and finalCount < moves[0][3]): break cur = moves.pop(0) i = cur[1] j = cur[2] c = cur[3] if(i == i_end and j == j_end): potentialMoves.append(cur) final = True finalCount = c if(i > i_end and isValidMove(i - 2, j - 1, n)): moves.append([cur[0] + " UL", i - 2, j - 1, c + 1]) if(i > i_end and isValidMove(i - 2, j + 1, n)): moves.append([cur[0] + " UR", i - 2, j + 1, c + 1]) if(j < j_end and isValidMove(i, j + 2, n)): moves.append([cur[0] + " R", i, j + 2, c + 1]) if(i < i_end and isValidMove(i + 2, j + 1, n)): moves.append([cur[0] + " LR", i + 2, j + 1, c + 1]) if(i < i_end and isValidMove(i + 2, j - 1, n)): moves.append([cur[0] + " LL", i + 2, j - 1, c + 1]) if(j > j_end and isValidMove(i, j - 2, n)): moves.append([cur[0] + " L", i, j - 2, c + 1]) print(potentialMoves[0][3]) print(potentialMoves[0][0].strip()) 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)