#include using namespace std; void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { vector moves(0); bool in_range = false; while(i_start != i_end || j_start != j_end) { if(in_range) { cout << "Impossible"; return; } if(abs(i_end - i_start) <= 2 && abs(j_end - j_start) <= 2) { in_range = true; } if(i_end < i_start && j_end <= j_start) //do UL { moves.push_back("UL"); i_start -= 2; j_start -= 1; } else if(i_end < i_start && j_end > j_start) //do UR { moves.push_back("UR"); i_start -= 2; j_start += 1; } else if(i_end == i_start && j_end > j_start) //do R { moves.push_back("R"); j_start += 2; } else if(i_end > i_start && j_end >= j_start) //do LR { moves.push_back("LR"); i_start += 2; j_start += 1; } else if(i_end > i_start && j_end < j_start) //do LL { moves.push_back("LL"); i_start += 2; j_start -= 1; } else //do L { moves.push_back("L"); j_start -= 2; } } cout << moves.size() << '\n'; for(vector::const_iterator cit = moves.begin(); cit != moves.end(); ++cit) { cout << *cit << ' '; } } int main() { int n; cin >> n; int i_start; int j_start; int i_end; int j_end; cin >> i_start >> j_start >> i_end >> j_end; printShortestPath(n, i_start, j_start, i_end, j_end); return 0; }