#!/bin/python import sys def printShortestPath(n, i_start, j_start, i_end, j_end, moves, path): if i_start-i_end>=2 and j_start-j_end>=1: moves += 1 path.append("UL") printShortestPath(n, i_start-2, j_start-1, i_end, j_end, moves, path) elif i_start-i_end>=2 and j_end-j_start>=1: moves += 1 path.append("UR") printShortestPath(n, i_start-2, j_start+1, i_end, j_end, moves, path) elif i_start-i_end==0 and j_end-j_start>=2: moves += 1 path.append("R") printShortestPath(n, i_start, j_start + 2, i_end, j_end, moves, path) elif i_end-i_start>=2 and j_end-j_start>=1: moves += 1 path.append("LR") printShortestPath(n, i_start + 2, j_start + 1, i_end, j_end, moves, path) elif i_end-i_start>=2 and j_start-j_end>=1: moves += 1 path.append("LL") printShortestPath(n, i_start + 2, j_start - 1, i_end, j_end, moves, path) elif i_start-i_end==0 and j_start-j_end>=2: moves += 1 path.append("L") printShortestPath(n, i_start, j_start - 2, i_end, j_end, moves, path) elif i_end - i_start >= 2: moves += 1 path.append("LR") printShortestPath(n, i_start + 2, j_start + 1, i_end, j_end, moves, path) elif i_start - i_end >= 2: moves += 1 path.append("Ul") printShortestPath(n, i_start - 2, j_start - 1, i_end, j_end, moves, path) elif i_start-i_end==0 and (j_start-j_end)%2!=0 and j_start!=j_end and i_start!=i_end: print "Impossible" print path elif i_start-i_end==0 and (j_end-j_start)%2!=0 and j_start!=j_end and i_start!=i_end: print "Impossible" else: if i_end != i_start: print "Impossible" elif j_start != j_end: print "Impossible" else: print moves print ' '.join(path) if __name__ == "__main__": n = int(raw_input().strip()) i_start, j_start, i_end, j_end = raw_input().strip().split(' ') i_start, j_start, i_end, j_end = [int(i_start), int(j_start), int(i_end), int(j_end)] moves = 0 path = [] printShortestPath(n, i_start, j_start, i_end, j_end, moves, path)