#include using namespace std; const int maxn = 222; int n, xs, ys, xt, yt; string s[6] = {"UL", "UR", "R", "LR", "LL", "L"}; int pre[maxn][maxn]; map > f; int main() { // freopen("input.in", "r", stdin); // freopen("output.out", "w", stdout); ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); cin >> n >> xs >> ys >> xt >> yt; f["L"] = make_pair(0, -2); f["R"] = make_pair(0, 2); f["UL"] = make_pair(-2, -1); f["UR"] = make_pair(-2, 1); f["LL"] = make_pair(2, -1); f["LR"] = make_pair(2, 1); queue < pair > q; q.push({xs, ys}); pre[xs][ys] = -1; while (!q.empty()) { int x = q.front().first, y = q.front().second; q.pop(); for (int i = 0; i < 6; ++i) { int u = x + f[s[i]].first, v = y + f[s[i]].second; if (u >= 0 && u < n && v >= 0 && v < n && !pre[u][v]) { pre[u][v] = i + 1; q.push({u, v}); } } } if (!pre[xt][yt]) { puts("Impossible"); } else { vector path; while (!(xs == xt && ys == yt)) { path.push_back(s[pre[xt][yt] - 1]); int u = f[s[pre[xt][yt] - 1]].first, v = f[s[pre[xt][yt] - 1]].second; xt -= u; yt -= v; } reverse(path.begin(), path.end()); cout << (int) path.size() << "\n"; for (auto it : path) cout << it << " "; } return 0; }