# Enter your code here. Read input from STDIN. Print output to STDOUT import Queue def shortest_path(x1,y1,x2,y2,n): q = Queue.Queue() step = 0 v = [[0 for x in range(n)] for y in range(n)] if((x1!=x2 or y1!=y2) and v[x1][y1]==0): q.put([x1,y1,step,'s']) while not q.empty(): k = q.get() #print k x = k[0] y = k[1] if(x==x2 and y==y2): return k step = k[2] v[x][y] = 1 #print v if((x-2>=0 and y-1>=0) and v[x-2][y-1] == 0): q.put([x-2,y-1,step+1,k[3]+" "+"UL"]) if((x-2>=0 and y+1=0) and v[x+2][y-1] == 0): q.put([x+2,y-1,step+1,k[3]+" "+"LL"]) if((x=0) and v[x][y-2] == 0): q.put([x,y-2,step+1,k[3]+" "+"L"]) return 0 n = int(raw_input()) x1,y1,x2,y2 = map(int,raw_input().split()) s = shortest_path(x1,y1,x2,y2,n) #print s if(s==0): print('Impossible') else: print s[2] m = s[3].split() m = m[1:] print(" ".join(str(x) for x in m))