#!/bin/python3 #UL, UR, R, LR, LL, L. import sys global i_start, j_start, i_end, j_end global step step = [] def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. if j_end < j_start and i_end < i_start and i_start - 2 in range(0,n) and j_start - 1 in range(0,n): j_start = j_start - 1 i_start = i_start - 2 step.append('UL') #print(i_start, j_start) printShortestPath(n, i_start, j_start, i_end, j_end) return if i_end < i_start and j_end == j_start and i_start - 2 in range(0,n) and j_start - 1 in range(0,n): j_start = j_start - 1 i_start = i_start - 2 step.append('UL') #print(i_start, j_start) printShortestPath(n, i_start, j_start, i_end, j_end) return if j_end > j_start and i_end < i_start and i_start - 2 in range(0,n) and j_start + 1 in range(0,n): j_start = j_start + 1 i_start = i_start - 2 step.append('UR') #print(i_start, j_start) printShortestPath(n, i_start, j_start, i_end, j_end) return if i_end == i_start and j_end > j_start and j_start + 2 in range(0,n): #j_start = j_start - 2 j_start = j_start + 2 step.append('R') #print(i_start, j_start) printShortestPath(n, i_start, j_start, i_end, j_end) return if j_end > j_start and i_end > i_start and i_start + 2 in range(0,n) and j_start + 1 in range(0,n): j_start = j_start + 1 i_start = i_start + 2 step.append('LR') #print(i_start, j_start) printShortestPath(n, i_start, j_start, i_end, j_end) return if i_end > i_start and j_end == j_start and i_start + 2 in range(0,n) and j_start + 1 in range(0,n): j_start = j_start + 1 i_start = i_start + 2 step.append('LR') #print(i_start, j_start) printShortestPath(n, i_start, j_start, i_end, j_end) return if j_end < j_start and i_end > i_start and i_start + 2 in range(0,n) and j_start - 1 in range(0,n): j_start = j_start - 1 i_start = i_start + 2 step.append('LL') #print(i_start, j_start) printShortestPath(n, i_start, j_start, i_end, j_end) return if i_end == i_start and j_end < j_start and j_start - 2 in range(0,n): #j_start = j_start - 2 j_start = j_start - 2 step.append('L') #print(i_start, j_start) printShortestPath(n, i_start, j_start, i_end, j_end) return if i_end == i_start and j_end == j_start: print(len(step)) print(*step, sep=' ') #print('done') return else: print('Impossible') return 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)