#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. steps = [] if (i_start - i_end) % 2 != 0: print('Impossible') return None else: i_curr = i_start j_curr = j_start while(j_curr != j_end or i_curr != i_end): if i_curr < i_end: if j_curr < j_end: steps.append('LR') j_curr += 1 i_curr += 2 elif j_curr > j_end: steps.append('LL') j_curr -= 1 i_curr += 2 elif j_curr == n: #coming down the same column steps.append('LL') j_curr -= 1 i_curr += 2 else: steps.append('LR') j_curr += 1 i_curr += 2 elif i_curr > i_end: if j_curr < j_end: steps.append('UR') j_curr += 1 i_curr -= 2 elif j_curr > j_end: steps.append('UL') j_curr -= 1 i_curr -= 2 elif j_curr == n: #coming down the same column steps.append('UL') j_curr -= 1 i_curr -= 2 else: steps.append('UR') j_curr += 1 i_curr -= 2 else: if j_curr > j_end: steps.append('L') j_curr = j_end elif j_curr < j_end: steps.append('R') j_curr = j_end print(len(steps)) #print(j_curr, j_end) print(' '.join(steps)) 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)