#[allow(unused_imports)]
use std::cmp::{max, min, Ordering};
#[allow(unused_imports)]
use std::collections::{HashMap, HashSet, BinaryHeap, VecDeque, BTreeSet, BTreeMap};
#[allow(unused_imports)]
use std::iter::FromIterator;
#[allow(unused_imports)]
use std::io::stdin;

mod util {
    use std::io::stdin;
    use std::str::FromStr;
    use std::fmt::Debug;

    #[allow(dead_code)]
    pub fn line() -> String {
        let mut line: String = String::new();
        stdin().read_line(&mut line).unwrap();
        line.trim().to_string()
    }

    #[allow(dead_code)]
    pub fn gets<T: FromStr>() -> Vec<T>
    where
        <T as FromStr>::Err: Debug,
    {
        let mut line: String = String::new();
        stdin().read_line(&mut line).unwrap();
        line.split_whitespace()
            .map(|t| t.parse().unwrap())
            .collect()
    }
}

#[allow(unused_macros)]
macro_rules! get {
    ($t:ty) => {
        {
            let mut line: String = String::new();
            stdin().read_line(&mut line).unwrap();
            line.trim().parse::<$t>().unwrap()
        }
    };
    ($($t:ty),*) => {
        {
            let mut line: String = String::new();
            stdin().read_line(&mut line).unwrap();
            let mut iter = line.split_whitespace();
            (
                $(iter.next().unwrap().parse::<$t>().unwrap(),)*
            )
        }
    };
    ($t:ty; $n:expr) => {
        (0..$n).map(|_|
                    get!($t)
                   ).collect::<Vec<_>>()
    };
    ($($t:ty),*; $n:expr) => {
        (0..$n).map(|_|
                    get!($($t),*)
                   ).collect::<Vec<_>>()
    };
    ($t:ty ;;) => {
        {
            let mut line: String = String::new();
            stdin().read_line(&mut line).unwrap();
            line.split_whitespace()
                .map(|t| t.parse::<$t>().unwrap())
                .collect::<Vec<_>>()
        }
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

fn main() {
    let (sx, sy, tx, ty) = get!(i64, i64, i64, i64);

    let mut grid = vec![vec![false; 3000]; 3000];

    let s = (250, 250);
    let t = (250 + (tx - sx) as usize, 250 + (ty - sy) as usize);

    let mut dest = true;
    let mut p = s;
    let mut count = 0;

    while count < 4 {
        if dest {
            grid[s.0][s.1] = true;
            grid[t.0][t.1] = false;
        } else {
            grid[s.0][s.1] = false;
            grid[t.0][t.1] = true;
        }
        let to = if dest { t } else { s };
        let (m, (x, y)) = (if dest {
                               vec![
                ('R', (p.0 + 1, p.1)),
                ('U', (p.0, p.1 + 1)),
                ('D', (p.0, p.1 - 1)),
                ('L', (p.0 - 1, p.1)),
            ]
                           } else {
                               vec![
                ('L', (p.0 - 1, p.1)),
                ('R', (p.0 + 1, p.1)),
                ('U', (p.0, p.1 + 1)),
                ('D', (p.0, p.1 - 1)),
            ]
                           }).into_iter()
            .filter(|&(_, (x, y))| !grid[x][y])
            .min_by_key(|&(_, (x, y))| {
                (to.0 as i64 - x as i64).abs() + (to.1 as i64 - y as i64).abs()
            })
            .unwrap();

        print!("{}", m);
        p = (x, y);
        if p == to {
            dest = !dest;
            count += 1;
        } else {
            grid[x][y] = true;
        }

    }
}


Measured memory_bytes: 12540