#include using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define trav(a, x) for(auto& a : x) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() typedef long long ll; typedef long double ld; typedef pair pii; typedef vector vi; const ll big = 1000000007; ll n,m,k,T; //string S[6] = {"R", "UR", "UL" , "L" , "LL" , "LR"}; string S[6] = {"UL", "UR", "R" , "LR" , "LL" , "L"}; ll DX[6] = {-2 , -2 , 0, 2 , 2 , 0}; ll DY[6] = {-1 , 1 , 2 , 1 , -1 , -2}; ll PAR[301][301] = {0}; ll x1; ll yk; ll x2,y2; bool inbounds(ll i, ll j){ return i>= 0 && j >= 0 && i < n && j < n; } void bfs(){ queue > Q; Q.push({x1,yk}); PAR[x1][yk] = 1337; while(!Q.empty()){ ll x = Q.front().first; ll y = Q.front().second; Q.pop(); for(ll c1 = 0; c1 < 6; c1++){ ll xx = x + DX[c1]; ll yy = y + DY[c1]; if(inbounds(xx,yy)){ if(PAR[xx][yy] == 0){ PAR[xx][yy] = c1+1; Q.push({xx,yy}); } } } } return; } int main() { //freopen("input.txt","r",stdin); //freopen("autput.txt","w",stdout); ll a,b,c,d; cin >> n; cin >> x1 >> yk >> x2 >> y2; bfs(); if(PAR[x2][y2] != 0){ vector ANS; while(PAR[x2][y2] != 1337){ ANS.push_back(S[PAR[x2][y2] - 1]); ll p = PAR[x2][y2]; x2 -= DX[p-1]; y2 -= DY[p-1]; } reverse(all(ANS)); cout << sz(ANS) << "\n"; for(ll c1 = 0; c1 < sz(ANS); c1++){ cout << ANS[c1] << " "; } } else{ cout << "Impossible\n"; } return 0; }