def printShortestPath(n, i_start, j_start, i_end, j_end): arr_priority = [0, 0, 0, 0, 0, 0] # UL, UR, R, LR, LL, L ydiff, xdiff = i_end - i_start, j_end - j_start if (ydiff)&1: print('Impossible') return type_ = (ydiff>>1)&1 # 0 if even j, otherwise 1 if type_ and not (xdiff)&1: print('Impossible') return if not type_ and (xdiff)&1: print('Impossible') return cnt = 0 while ydiff*ydiff + xdiff*xdiff > 0: cnt += 1 if xdiff == 0: if ydiff > 0: if j_start == n: arr_priority[4] += 1 # LL i_start += 2 j_start -= 1 else: arr_priority[3] += 1 # LR i_start += 2 j_start += 1 else: if j_start == 0: arr_priority[1] += 1 # UR i_start -= 2 j_start += 1 else: arr_priority[0] += 1 # UL i_start -= 2 j_start -= 1 elif xdiff > 0: if ydiff > 0: arr_priority[3] += 1 # LR i_start += 2 j_start += 1 elif ydiff < 0: arr_priority[1] += 1 # UR i_start -= 2 j_start += 1 else: arr_priority[2] += 1 # R j_start += 2 else: if ydiff > 0: arr_priority[4] += 1 # LL i_start += 2 j_start -= 1 elif ydiff < 0: arr_priority[0] += 1 # UL i_start -= 2 j_start -= 1 else: arr_priority[5] += 1 # L j_start -= 2 ydiff, xdiff = i_end - i_start, j_end - j_start directions = '{}{}{}{}{}{}'.format( 'UL '*arr_priority[0], 'UR '*arr_priority[1], 'R '*arr_priority[2], 'LR '*arr_priority[3], 'LL '*arr_priority[4], 'L '*arr_priority[5], ) print(cnt) print(directions) return 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)