#!/bin/python # stack data (i,j,path) import sys def fits(i,j,n): return i >= 0 and i <= n - 1 and j >=0 and j <= n - 1 def moves(i,j,n): temp = [] temp.append(('UL',(i-2,j-1))) temp.append(('UR',(i-2,j+1))) temp.append(('R',(i,j+2))) temp.append(('LR',(i+2,j+1))) temp.append(('LL',(i+2,j-1))) temp.append(('L',(i,j-2))) ans = [t for t in temp if fits(t[1][0],t[1][1],n)] return ans def printShortestPath(n, i_start, j_start, i_end, j_end): x = set([(i_start,j_start)]) stk = [([],(i_start,j_start))] while stk: p,(i,j) = stk.pop() if (i,j) == (i_end,j_end): print len(p) print ' '.join(p) return movs = moves(i,j,n) add = [] for m in movs: if not m[1] in x: x.add(m[1]) add.append((p+[m[0]],m[1])) stk = add[::-1] + stk 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)