using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { // Print the distance along with the sequence of moves. List moves = new List(); int i = 0 ; if((i_start%2)==(i_end%2)){ try{ if(j_start==j_end){ if(i_start>i_end){ moves.Add("UR"); i_start-=2; j_start+=1; i++; } else{ moves.Add("LR"); i_start+=2; j_start+=1; i++; } } while(j_start!=j_end){ if(i_start>i_end && j_start>j_end){ moves.Add("UL"); i_start-=2; j_start-=1; i++; } else if(i_start>i_end && j_startj_end){ moves.Add("LL"); i_start+=2; j_start-=1; i++; } else if(i_startj_end){ moves.Add("L"); j_start-=2; i++; } else{ moves.Add("R"); j_start+=2; i++; } } } } catch(Exception e){ Console.WriteLine("Impossible"); } Console.WriteLine(moves.Count); foreach(string s in moves){ Console.Write(s+" "); } } else{ Console.WriteLine("Impossible"); } } static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string[] tokens_i_start = Console.ReadLine().Split(' '); int i_start = Convert.ToInt32(tokens_i_start[0]); int j_start = Convert.ToInt32(tokens_i_start[1]); int i_end = Convert.ToInt32(tokens_i_start[2]); int j_end = Convert.ToInt32(tokens_i_start[3]); printShortestPath(n, i_start, j_start, i_end, j_end); } }