#include typedef long long ll; using namespace std; int dx[] = {-2, -2, 0, 2, 2, 0}; int dy[] = {-1, 1, 2, 1, -1, -2}; string moves[] = {"UL", "UR", "R", "LR", "LL", "L"}; int main(){ ios_base::sync_with_stdio(0); int n; cin >> n; int si, sj, ei, ej; cin >> si >> sj >> ei >> ej; vector >dist(n, vector(n, 1000)); vector, string> > >par(n, vector, string> >(n)); queue >q; q.push(make_pair(si, sj)); dist[si][sj] = 0; while(q.size()){ int i = q.front().first, j = q.front().second; q.pop(); for(int k = 0; k < 6; k++){ int ni = i + dx[k], nj = j + dy[k]; if(ni < 0 || nj < 0 || ni >= n || nj >= n) continue; if(dist[ni][nj] > dist[i][j] + 1){ dist[ni][nj] = dist[i][j] + 1; par[ni][nj] = make_pair(make_pair(i, j), moves[k]); q.push(make_pair(ni, nj)); } } } if(dist[ei][ej] == 1000) cout << "Impossible"; else{ cout << dist[ei][ej] << '\n'; vectorres; while(ei != si || ej != sj){ res.push_back(par[ei][ej].second); int ni = par[ei][ej].first.first, nj = par[ei][ej].first.second; ei = ni; ej = nj; } for(int i = res.size() - 1; i >= 0; i--) cout << res[i] << ' '; } return 0; }