#!/bin/python import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. if (i_start % 2) != (i_end % 2): print "Impossible" return path = nextMove(n, i_start, j_start, i_end, j_end) print len(path) print ' '.join(path) def nextMove(n, i_start, j_start, i_end, j_end, path=None): if path is None: path = list() move = '' if i_start - i_end < 0: i_next = i_start + 2 move += 'L' elif i_start - i_end > 0: i_next = i_start - 2 move += 'U' else: i_next = i_start if j_start - j_end < 0: j_next = j_start + 1 if move else j_start + 2 move += 'R' elif j_start - j_end > 0: j_next = j_start - 1 if move else j_start - 2 move += 'L' else: # UL, UR, R, LR, LL, L if move == 'U': j_next = j_start - 1 move += 'L' elif move == 'L': j_next = j_start + 1 move += 'R' path.append(move) if i_next == i_end and j_next == j_end: return path else: try: return nextMove(n, i_next, j_next, i_end, j_end, path=path) except RuntimeError: print 'Impossible' if __name__ == "__main__": n = int(raw_input().strip()) i_start, j_start, i_end, j_end = raw_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)