#include using namespace std; int main() { int n; cin >> n; int y1, x1, y2, x2; cin >> y1 >> x1 >> y2 >> x2; if ((abs(y2 - y1) & 1) || (abs(y2 - y1) % 4 == 0 && (abs(x2 - x1) & 1)) || (abs(y2 - y1) % 4 != 0 && !(abs(x2 - x1) & 1))) { cout << "Impossible" << endl; return 0; } vector res; while (y1 != y2 || x1 != x2) { if (y1 > y2) { y1 -= 2; if (x1 > x2) { res.push_back("UL"); --x1; } else { res.push_back("UR"); ++x1; } } else if (y1 < y2) { y1 += 2; if (x1 > x2) { res.push_back("LL"); --x1; } else { res.push_back("LR"); ++x1; } } else { if (x1 > x2) { res.push_back("L"); x1 -= 2; } else { res.push_back("R"); x1 += 2; } } } cout << res.size() << endl; for (auto s : res) printf("%s ", s.c_str()); /* Enter your code here. Read input from STDIN. Print output to STDOUT */ return 0; }