t = int(input()) x1,y1,x2,y2 = map(int, input().split()) board = [["" for i in range(t)] for j in range(t)] board[x1][y1] = "X" direc = {"UL":[-2,-1], "UR":[-2,1], "R":[0,2], "LR":[2,1], "LL":[2,-1],"L":[0,-2]} step = [(x1, y1)] while(len(step) > 0): curx, cury = step[0][0], step[0][1] for d in ["UL","UR","R","LR","LL","L"]: t1, t2 = curx + direc[d][0], cury + direc[d][1] if (t1 >= 0 and t1 < t and t2 >= 0 and t2 < t and board[t1][t2] == ""): board[t1][t2] = d step.append((t1,t2)) if board[x2][y2] != "": break del(step[0]) if board[x2][y2] == "": print("Impossible") else: cnt = 0 step = [] x, y = x2, y2 while (x != x1 or y!= y1): step.append(board[x][y]) x, y = x-direc[board[x][y]][0], y-direc[board[x][y]][1] cnt += 1 print(cnt) print(" ".join(step[::-1]))