#!/bin/python3 import sys def UL(i,j): i = i - 2 j = j - 1 return i,j def L(i,j): j = j - 2 return i,j def LL(i,j): i = i + 2 j = j - 1 return i,j def LR(i,j): i = i + 2 j = j + 1 return i,j def R(i,j): j = j + 2 return i,j def UR(i,j): i = i - 2 j = j + 1 return i,j def printShortestPath(n, i_start, j_start, i_end, j_end): bound_cross = 0 i = i_start j = j_start steps = list() while((bound_cross==0) & ((i != i_end) | (j != j_end))): if i < i_end: if j <= j_end: i,j = LR(i,j) steps.append('LR') if j > j_end + 1: print("Impossible") break; if j > j_end: i,j = LL(i,j) steps.append('LL') if j < j_end - 1: print("Impossible") break; if i > i_end: print("Impossible") break; if i > i_end: if j <= j_end: i,j = UR(i,j) steps.append('UR') if j > j_end + 1: print("Impossible") if j > j_end: i,j = UL(i,j) steps.append('UL') if j < j_end - 1: print("Impossible") if i < i_end: print("Impossible") break; if i == i_end: if j < j_end: i,j = R(i,j) steps.append('R') if j > j_end: print("Impossible") break; if j > j_end: i,j = L(i,j) steps.append('L') if j < j_end: print("Impossible") break; if((i == i_end) & (j == j_end)): print(len(steps)) for step in steps: print(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)