import sys def printShortestPath(n, i_start, j_start, i_end, j_end): m = [[None]*n for _ in range(n)] vals = {'UL': 1, 'UR': 2, 'R': 3, 'LR': 4, 'LL': 5, 'L': 6} def check(i, j): return 0 <= i < n and 0 <= j < n def score(moves): if moves == None: return sys.maxsize val = 0 for move in moves: val = val*10 + vals[move] return val def solve(i, j, moves): if score(moves) > score(m[i][j]): return m[i][j] = moves if i == i_end and j == j_end: return if check(i-2, j-1): solve(i-2, j-1, moves+['UL']) if check(i-2, j+1): solve(i-2, j+1, moves+['UR']) if check(i, j+2): solve(i, j+2, moves+['R']) if check(i+2, j+1): solve(i+2, j+1, moves+['LR']) if check(i+2, j-1): solve(i+2, j-1, moves+['LL']) if check(i, j-2): solve(i, j-2, moves+['L']) solve(i_start, j_start, []) if not m[i_end][j_end]: print('Impossible') else: print(len(m[i_end][j_end])) print(' '.join(m[i_end][j_end])) 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)