import sys n = int(raw_input().strip()) i_start, j_start, i_end, j_end = raw_input().strip().split(' ') def hasUL(node): if node[0]>1 and node[1]>0: return True return False def hasUR(node): if node[0]>1 and node[1]0: return True return False def hasL(node): if node[1]>1: return True return False def getUL(node): x = node[3]+('UL',) return (node[0]-2,node[1]-1,node[2]+1,x) def getUR(node): x = node[3]+('UR',) return (node[0] - 2, node[1]+1, node[2] + 1, x) def getR(node): x = node[3]+('R',) return (node[0], node[1] + 2, node[2] + 1, x) def getLR(node): x = node[3]+('LR',) return (node[0] + 2, node[1] + 1, node[2] + 1, x) def getLL(node): x = node[3]+('LL',) return (node[0] +2, node[1] - 1, node[2] + 1, x) def getL(node): x = node[3]+( 'L',) return (node[0], node[1]-2, node[2] + 1, x) def printShortestPath(n, i_start, j_start, i_end, j_end): queue = [(i_start,j_start,0,()),] visited = {} visited[(i_start,j_start)] = True ans = -1 curr = [] while len(queue) != 0 : curr = queue[0] if curr[:2]==(i_end,j_end): ans = curr[2:] break del queue[0] if hasUL(curr): now = getUL(curr) if now[:2] not in visited: visited[now[:2]] = True queue.append(now) if hasUR(curr): now = getUR( curr ) if now[:2] not in visited: visited[now[:2]] = True queue.append( now ) if hasR( curr ): now = getR( curr ) if now[:2] not in visited: visited[now[:2]] = True queue.append( now ) if hasLR( curr ): now = getLR( curr ) if now[:2] not in visited: visited[now[:2]] = True queue.append( now ) if hasLL( curr ): now = getLL( curr ) if now[:2] not in visited: visited[now[:2]] = True queue.append( now ) if hasL( curr ): now = getL( curr ) if now[:2] not in visited: visited[now[:2]] = True queue.append( now ) if ans==-1: print 'Impossible' else: path = [] print ans[0] for i in ans[1]: print i, 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)