package main import "fmt" func main() { //Enter your code here. Read input from STDIN. Print output to STDOUT var n,ky,kx,ey,ex,dy,dx int fmt.Scan(&n) fmt.Scan(&ky,&kx) fmt.Scan(&ey,&ex) dy = ky-ey dx = kx-ex if dy % 2 == 1 { fmt.Println("Impossible") return } moves := []string{} for dy != 0 || dx != 0 { if dy == 0 { if dx < 0 { moves = append(moves,"R") kx += 2 } else if dx > 0 { moves = append(moves,"L") kx -=2 } } else if dy > 0 { if dx < 0 { moves = append(moves,"UR") kx++ ky -= 2 } else { moves = append(moves,"UL") kx-- ky -= 2 } } else { if dx > 0 { moves = append(moves,"LL") kx-- ky += 2 } else { moves = append(moves,"LR") kx++ ky += 2 } } dy = ky-ey dx = kx-ex //fmt.Println(moves[len(moves)-1],dy,dx) } fmt.Println(len(moves)) for _,i := range moves { fmt.Print(i," ") } }