#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. if (i_start % 2 != i_end % 2) or ((i_start % 4 == i_end % 4) and (j_start % 2 != j_end % 2)) or ((i_start % 4 != i_end % 4) and (j_start % 2 == j_end % 2)): print("Impossible") else: moves = 0 smoves = "" while(i_start != i_end or j_start != j_end): moves += 1 if i_start > i_end and j_start > j_end - (i_start - i_end)//2 and j_start > 0: smoves += "UL " i_start -= 2 j_start -= 1 elif i_start > i_end: smoves += "UR " i_start -= 2 j_start += 1 elif i_start <= i_end and j_start < j_end - (i_end - i_start)//2: smoves += "R " j_start += 2 elif i_start < i_end and j_start < j_end + (i_end - i_start)//2: smoves += "LR " i_start += 2 j_start += 1 elif i_start < i_end and j_start >= j_end + (i_end - i_start)//2: smoves += "LL " i_start += 2 j_start -= 1 else: smoves += "L " j_start -= 2 print(moves) print(smoves[:len(smoves)-1]) if __name__ == "__main__": n = int(input().strip()) i_start, j_start, i_end, j_end = input().strip().split(' ') i_start, j_start, i_end, j_end = [int(i_start), int(j_start), int(i_end), int(j_end)] printShortestPath(n, i_start, j_start, i_end, j_end)