jiahuimbzuai/CoQuIR huggingface dataset:
//  [javascript]
var output;
var input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
var obj = {
  "list" : input,
  "index" : 0,
  "max" : input.length,
  "next" : function(){
    if(!this.hasNext()){throw "NoSuchElementException:次に要素は無いよ";}
    var returnObj = this.list[this.index];
    this.index++;
    return returnObj;
  },
  "hasNext" : function(){return (this.index < this.max);}
}
Main();
function next(){return obj.next();}
function hasNext(){return obj.hasNext();}
function myout(t){console.log(t);}//standard output
function myerr(t){console.error(t);}//standard error
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す
//1:数値へ変換 2:半角SPで分割 4:半角SPで分割し、数値配列へ
//6:1文字に分割 7:1文字に分割し、数値配列へ
//8:半角SPで結合 9:改行で結合 0:文字なしで結合
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}
function Main() {
  var one = myconv(next(),4);
  var N = one[0];
  var M = one[1];
  var nlist = new Array(N);
  for(var i = 0; i < N; i++){
    nlist[i] = next();
  }
  var mlist = new Array(M);
  for(var i = 0; i < M; i++){
    mlist[i] = next();
  }
  var count = 0;
  for(var i = 0; i < N-M+1; i++){
    for(var j = 0; j < N-M+1; j++){
      var first = nlist[i].slice(j,j+M);
      if(first == mlist[0]){ 
        var isNG = false;
      	var check = "";
        check = "i : " + i + ",j : " + j;
        for(var k = 1; k < M; k++){
          var nextStr = nlist[i + k].slice(j,j + M);
          if(nextStr != mlist[k]){
            isNG = true;
             break;
          }
        }
        if(!isNG){
          myout("Yes");
          myerr(check);
          return;
        }
      }
    }
  }
  myout("No");
}
//  [go]
package main

import (
    "fmt"
)

func main() {
    var n, m int
    fmt.Scan(&n, &m)

    as := make([][]byte, n)
    for i := range as {
        var b []byte
        fmt.Scan(&b)
        as[i] = b
    }
    bs := make([][]byte, m)
    for i := range bs {
        var b []byte
        fmt.Scan(&b)
        bs[i] = b
    }

    var ok bool
    for i := 0; i < n; i++ {
        for j := 0; j < n; j++ {
            var ng bool
            for k := 0; k < m; k++ {
                for l := 0; l < m; l++ {
                    if i+k >= n || j+l >= n {
                        ng = true
                    } else if as[i+k][j+l] != bs[k][l] {
                        ng = true
                    }
                }
            }
            if !ng {
                ok = true
            }
        }
    }

    if ok {
        fmt.Println("Yes")
    } else {
        fmt.Println("No")
    }
}
//  [go]
package main
 
import (
  	"fmt"
)
 
func main() {
  var N, M int
  fmt.Scan(&N)
  fmt.Scan(&M)
  
  a := make([]string, N)
  for i := 0; i < N; i++ {
  	fmt.Scan(&a[i])
  }
  b := make([]string, M)
  for i := 0; i < M; i++ {
  	fmt.Scan(&b[i])
  }
  
  ans := "No"
  for i := 0; i < N; i++ {
    for j := 0; j < N; j++ {
      if (i + M > N) || (j + M > N) {
        continue
      }
      
  	  flag := true
      for y := 0; y < M; y++ {
        for x := 0; x < M; x++ {
          if a[i+y][j+x:j+x+1] != b[y][x:x+1] {
            flag = false
          }
        }
      }
      if flag {
        ans = "Yes"
      }
    }
  }
  fmt.Printf("%s\n", ans)
}
//  [go]
package main

import "fmt"

func main() {
	// Code for B - Template Matching
	var N, M int
	fmt.Scanf("%d %d", &N, &M)

	A := make([]string, N)
	B := make([]string, M)

	for i := 0; i < N; i++ {
		fmt.Scanf("%s", &A[i])
	}

	for i := 0; i < M; i++ {
		fmt.Scanf("%s", &B[i])
	}

	var flag1, flag2 int
	for i := 0; i < (N - M + 1); i++ {
		for j := 0; j < (N - M + 1); j++ {
			flag1 = 0
			for k := 0; k < M; k++ {
				//fmt.Println(A[i][j:j+M], B[k][0:M])
				if A[i+k][j:j+M] != B[k][0:M] {
					flag1 = 1
				}
			}
			if flag1 == 0 {
				flag2 = 1
				break
			}
		}
	}

	if flag2 == 0 {
		fmt.Println("No")
	} else {
		fmt.Println("Yes")
	}
}
//  [ruby]
def ok
  N.times do |i|
    N.times do |j|
      next unless 0<=i && i+M-1<N
      f=true
      M.times do |k|
        M.times do |l|
          f=false if A[i+k][j+l]!=B[k][l]
        end
      end
      return true if f
    end
  end
  false
end
N,M=gets.split.map &:to_i
A=N.times.map{gets.chop}
B=M.times.map{gets.chop}
puts ok ? :Yes : :No
//  [ruby]
def solve(a,b,n,m)
	ans=false
	for i in 0..n-m
		for j in 0..n-m
			same=true
			for k in 0..m-1
				for l in 0..m-1
					if a[i+k][j+l]!=b[k][l]
						same=false
					end
				end
			end
			if same==true then ans=true end
		end
	end
	puts ans==true ? "Yes" : "No" 
end

if __FILE__==$0
	rl_i=lambda{|str,dl|str.strip.split(dl).map(&:to_i)}
	r_s=lambda{|str|str.strip}
	dl=" "
	n=rl_i[gets,dl]
	a=[]
	b=[]
	n[0].times do |i|
		a.push(r_s[gets])
	end
	n[1].times do |i|
		b.push(r_s[gets])
	end
	solve(a,b,n[0],n[1])
end
//  [ruby]
N,M = gets.split.map(&:to_i)

A = Array.new
B = Array.new

(1..N).each do |i|
    str = gets
    A.push(str)
end 

(1..M).each do |i|
    str = gets
    B.push(str)
end

(0..(N - M)).each do |i|
    (0..(N - M)).each do |j|
        f = true
        (0..M - 1).each do |k|
            (0..M-1).each do |l|
                f = false if B[k][l] != A[i + k][j + l]
            end
        end
        if f
            puts("Yes")
            exit(0)
        end
    end
end

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

fn main() {
    let (n, m) = scan!(usize, usize);
    let vs = scan!(String;n);
    let ws = scan!(String;m);

    for i in 0.. {
        if i + m > n {
            break;
        }
        for j in 0.. {
            if j + m > n {
                break;
            }

            let mut valid = true;
            for k in i..i + m {
                for l in j..j + m {
                    if vs[k].chars().nth(l).unwrap() != ws[k - i].chars().nth(l - j).unwrap() {
                        valid = false;
                    }
                }
            }

            if valid {
                println!("Yes");
                return;
            }
        }
    }
    println!("No")
}
//  [rust]
#[allow(dead_code)]

pub struct Scanner {
    idx: usize, 
    buf: Vec<String>,
}

impl Scanner {
    pub fn new<T: std::io::Read>(inf: &mut T) -> Scanner {
        Self {
            idx:0,
            buf: {
                let mut s = String::new();
                inf.read_to_string(&mut s).expect("I/O error");
                s.split_whitespace().map(|x| x.to_owned()).collect()
            },
        }
    }

    pub fn read<T: std::str::FromStr> (&mut self) -> T 
    where
        <T as std::str::FromStr>::Err: std::fmt::Debug,
    {
        if self.empty() {
            panic!("reached the end of input")
        }
        let ret = self.buf[self.idx].parse::<T>().expect("parse error");
        self.idx += 1;
        return ret;
    }

    pub fn empty(&self) -> bool {
        return self.idx >= self.buf.len();
    }
}

fn main() {
    let mut sc = Scanner::new(&mut std::io::stdin());
    let n: usize = sc.read();
    let m: usize = sc.read();
    let a: Vec<Vec<char>> = (0..n).map(|_| sc.read::<String>().chars().collect()).collect();
    let b: Vec<Vec<char>> = (0..m).map(|_| sc.read::<String>().chars().collect()).collect();

    let mut ans = false;

    for i in 0..n {
        for j in 0..n {
            let mut cnt = 0;
            for ii in 0..m {
                for jj in 0..m {
                    if i + ii >= n || j + jj >= n {
                        continue;
                    }
                    if a[i + ii][j + jj] == b[ii][jj] {
                        cnt += 1;
                    }
                }
            }
            if cnt >= m * m {
                ans = true;
            }
        }
    }


    println!("{}", if ans { "Yes" } else { "No" });
}
//  [python]
N=int(input())
import numpy as np
print(2**int(np.log2(N)))
//  [python]
import math
print 2 ** int(math.floor(math.log(int(raw_input()),2)))
//  [java]
import java.util.Arrays;
import java.util.Optional;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Integer[] num=new Integer[new Scanner(System.in).nextInt()];
		for(int i=1;i<=num.length;i++) {
			num[i-1]=i;
		}
		Optional<Integer> maxdivision=Arrays.asList(num)
				.stream()
				.map(Main::countCanDivideBy2)
				.max(Integer::compare);
		int result=(int) Math.pow(2d,maxdivision.get().doubleValue());
		System.out.println(result);
	}
	public static int countCanDivideBy2(Integer i) {
		int result=0;
		for(;i%2==0&&i>0;result++) {
			i/=2;
		}
		return result;
	}
}
//  [java]
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int[][] ans = new int[n][2];

            for (int i = 0; i < n; i++) {
                int cnt = 0;
                int tmp = i + 1;
                while (tmp >= 1) {
                    if (tmp % 2 == 0) {
                        cnt++;
                        tmp /= 2;
                    } else {
                        break;
                    }
                }
                ans[i][0] = i + 1;
                ans[i][1] = cnt;
            }

            Arrays.sort(ans, (x, y) -> Integer.compare(x[1], y[1]));
            // 出力
            out.println(ans[n - 1][0]);

        }

    }
}
//  [cpp]
#include "bits/stdc++.h"
using namespace std;

#define ll long long int
#define str string

ll MOD = 1000000007, INFL = 1ll << 60, INF = 1 << 30;
pair <ll, ll> A[10000000] = {}, X[1000000] = {};
int dy[] = { 0, 0, 1, -1 }, dx[] = { 1, -1, 0, 0 };
vector <ll> v;
ll a = 0, b = 0, c = 0, n = 0, sum = 0, max = INF;
str S;
ll ans = 0;

int findDigits(int n) {
	int i = 0;
	while (n > 0) {

		sum += n % 10;
		n /= 10;
		i++;
	}
	return i;
}


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	//Code Line
	cin >> a;
	b = 1;
	for (int i = 0; i > -1; i++) {
		if (a / b == 1) {
			break;
		}
		b *= 2;

	}
	cout << b << endl;
	//Code Line
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
#define dhoom ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);  
typedef long long ll;
typedef long double ld;
const ll inf = 1e18;
const int nax = 2e6 + 7;
const ll mod = 1e9 + 7;
//ll tree[4 * nax];
//9uS-22RSwk7gQqh

map< int , int > mp[nax];
int main()
{
	int n;
	cin >> n;
	int ans = 0;
	while(n != 0){
		n/=2;
		ans++;
	}
	cout << pow(2 , ans - 1) << endl;
	return 0;
}
//  [cpp]
#include <cstdio>
#include <cmath>
using namespace std;
int a[7]={ 1,2,4,8,16,32,64 };
int main()
{
    int n;
    while(scanf("%d",&n)==1)
    {
        int i;
        for(i=0;i<7;i++)
            if(a[i]>n)break;
        printf("%d\n",a[i-1]);
    }
    return 0;
}
//  [c]
#include<stdio.h>
int main(void){
  int N;
  scanf("%d",&N);
  int EXP=1;
  do{
    EXP=EXP*2;
  }while(EXP<=N);
  printf("%d\n",EXP/2);

  return 0;
}
//  [c]
#include<stdio.h>

int main(void)
{
   int n, i=1;

   scanf("%d",&n);

   while(i*2<=n)
      i=i*2;

   printf("%d\n",i);

   return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>

int main(void){

    int N;

    scanf("%d", &N);

    if(N <= 1){
        printf("1\n");
    }else if(N <= 3){
        printf("2\n");
    }else if(N <= 7){
        printf("4\n");
    }else if(N <= 15){
        printf("8\n");
    }else if(N <= 31){
        printf("16\n");
    }else if(N <= 63){
        printf("32\n");
    }else{
        printf("64\n");
    }

    return 0;
}
//  [javascript]
function count(n) {
    var c = 0;
    while (n % 2 === 0) {
        n = Math.floor(n / 2);
        c += 1;
    }
    return c;
}

function Main(inp) {
    var input = inp.split("\n");
    var n = Number(input[0]);
    var max = 0;
    var r = 1;
    for (var i = 1; i <= n; i++) {
        var c = count(i);
        if (c > max) {
            max = c;
            r = i;
        }
    }
    console.log(r);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
/**
 * Created by kagawa on 2017/07/29.
 */
function main(input){
    var num = [1, 2, 4, 8, 16, 32, 64];
    for(var i = num.length-1; i>=0; i--){
        if(input >= num[i]){
            console.log(num[i]);
            return;
        }
    }

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input){
  for(var i=0;i<=10;i++){
    if(Math.pow(2,i)>input){
      i--;
      break;
    }
  }
  console.log(Math.pow(2,i))
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
//  [go]
package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func contains(target string, list []string) bool {
	for _, r := range list {
		if target == r {
			return true
		}
	}
	return false
}

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()

	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func nextF64() float64 {
	sc.Scan()

	i, e := strconv.ParseFloat(sc.Text(), 64)
	if e != nil {
		panic(e)
	}
	return i
}

func isInteger(x float64) bool {
	return math.Floor(x) == x
}

func Ave(s []int) int {
	val := 0
	for _, i := range s {
		val += i
	}
	return int(val / len(s))
}
func cal(i int) (sum int) {
	for i != 0 {
		sum += i % 10
		i /= 10
	}
	return
}
func max(a []int) (idx int, val int) {
	max := a[0]
	idx = 0
	for j, i := range a {
		if max < i {
			max = i
			idx = j
		}
	}
	return idx, max
}

func draw(i int, a []int) (l []int) {
	// p = a[i]
	for j := i; j < len(a); j++ {
		if j != len(a)-1 {
			a[j] = a[j+1]
		} else if j == len(a)-1 {
			a = a[:len(a)-1]
		}
	}
	return a
}

func main() {
	sc.Split(bufio.ScanWords)
	// sc.Buffer([]byte{}, math.MaxInt64)
	// a := make([][]int, 3)
	// for i := 0; i < 3; i++ {
	// 	a[i] = make([]int, 3)
	// }
	// for i := 0; i < 3; i++ {
	// 	for j := 0; j < 3; j++ {
	// 		a[i][j] = nextInt()
	// 	}
	// }

	n := nextInt()

	var out int
	var ans int

	if n == 1 {
		ans = 1
	}

	for i := 2; i <= n; i++ {
		if i%2 == 0 {
			cnt := 0
			for j := i; j%2 == 0; {
				j = j / 2
				cnt++
			}
			if cnt > out {
				out = cnt
				ans = i
			}

		}

	}

	fmt.Println(ans)

}
//  [go]
package main

import "fmt"

func main() {
	var N int
	fmt.Scan(&N)
	v := N & -N
	for N-v > 0 {
		N -= v
		v = N & -N
	}
	fmt.Println(N)
}
//  [go]
package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)

	ans := 1
	mx := 0
	for i := 1; i <= n; i++ {
		t := i
		c := 0
		for t%2 == 0 {
			c++
			t /= 2
		}
		if mx < c {
			mx = c
			ans = i
		}
	}
	fmt.Println(ans)
}
//  [ruby]
n = gets.strip.to_i
i = 0

while 2 ** i <= n do
    i += 1
end

puts 2 ** (i - 1)
//  [ruby]
n =gets.to_i
exp = 0
while true
  if 2 ** exp > n
    break
  end
  exp += 1
end
puts 2 ** (exp - 1)
//  [ruby]
n = gets.to_i
max = 1
maxCnt = 0

(1..n).each do |val|
    tmpCnt = 0
    if val.odd?
        next
    else
        calcVal = val
        while calcVal.even?
            calcVal /= 2
            tmpCnt += 1
        end
    end
    
    if tmpCnt > maxCnt
        maxCnt = tmpCnt
        max = val
    end
end

puts max
//  [rust]
#[allow(unused_imports)]
use std::{cmp::Reverse, collections::*};

#[allow(unused_imports)]
use proconio::{
    fastout, input,
    marker::{Chars, Usize1},
};

#[allow(unused_imports)]
use itertools::Itertools;

#[allow(unused_imports)]
use num::Integer;

#[fastout]
pub fn main() {
    input! {
        n: usize,
    }

    let twos = [1, 2, 4, 8, 16, 32, 64];
    println!("{}", twos.iter().rev().find(|&&x| x <= n).unwrap());
}
//  [rust]
use whiteread::parse_line;

fn main() {
    let mut n: u32 = parse_line().unwrap();
    let mut z: u32 = 0;
    while n > 1 {
        n >>= 1;
        z += 1;
    }
    println!("{}", 2_u32.pow(z));
}
//  [swift]
import Foundation

let n = Int(readLine()!)!
var ans = 1
var count = 0
for i in 1...n {
  var div = i
  var c = 0
  while div % 2 == 0 {
    c += 1
    div /= 2
  }
  if count < c {
    ans = i
    count = c
  }
}
print(ans)
//  [swift]
import Foundation
var s = [Int]()
for i in 0 ..< 10 {
    var a = Int(pow(2, Double(i)))
    s.append(a)
}

let a = Int(readLine()!)!

var num = 0
while a >= s[num] {
    num += 1
}
print(s[num-1])
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const N = Number(input[0][0]);

  let exponent = 0;

  for (let i = 2; i <= N; i *= 2) {
    exponent += 1;
  }

  return 2 ** exponent;
};

console.log(main(read()));
//  [python]
from bisect import bisect_left, bisect_right

N = int(input())

color = []
color.append(int(input()))

for i in range(N-1):
  A = int(input())
  
  if color[-1] >= A:
    color.append(A)

  else:
    color.reverse()
    l = bisect_left(color,A)
    color[l-1] = A
    color.reverse()


print(len(color))
//  [python]
N = int(input())
A = list(int(input()) for _ in range(N))

S = [A[0]]
for i in range(1, N):
    if A[i] <= S[0]:
        S.insert(0, A[i])
        continue
    ok = 0
    ng = len(S)
    tmp = (ok+ng)
    while ok+1 < ng:
        tmp = (ok+ng)//2
        if A[i] > S[tmp]:
            ok = tmp
        else:
            ng = tmp
    S[ok] = A[i]
print(len(S))
//  [python]
#!/usr/bin python3
# -*- coding: utf-8 -*-

from bisect import bisect_left

N = int(input())
A = []
for _ in range(N):
    x = int(input())
    idx = bisect_left(A, x)
    if idx == 0:
        A.insert(idx, x)
    elif A[idx-1] == x:
        A.insert(idx, x)
    else:
        A[idx-1] = x
#    print(A,x)
print(len(A))
//  [java]

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final List<Integer> colors = new ArrayList<>();

        for (int i = 0; i < n; i++) {
            final int next = scanner.nextInt();
            insert(colors, next);
        }

        System.out.println(colors.size());
    }

    private static void insert(final List<Integer> list, final int value) {
        if (list.isEmpty()) {
            list.add(value);
            return;
        }

        if (value <= list.get(0)) {
            list.add(0, value);
            return;
        }

        if (value > list.get(list.size() - 1)) {
            list.set(list.size() - 1, value);
            return;
        }

        //final int index = mySearch(list, value, 0, list.size() - 1);
        int index;
        for (index = 0; index < list.size(); index++) {
            if (list.get(index) >= value) {
                break;
            }
        }
        list.set(index - 1, value);
    }

    private static int mySearch(final List<Integer> list, final int value, final int start, final int end) {
        if (end - start <= 1) {
            return start;
        }

        final int means = (start + end) / 2;
        if (value <= list.get(means)) {
            return mySearch(list, value, start, means);
        } else {
            return mySearch(list, value, means + 1, end);
        }
    }
}
//  [java]
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    resolve(System.in, System.out);
  }

  static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int n = Integer.parseInt(sc.next());
    long[] colorToMin = new long[n];
    long totalMin = -1;
    int colors = 0;
    for (int i = 0; i < n; i++) {
      long a = Long.parseLong(sc.next());
      boolean canPaintSameColor = false;
      if (totalMin < a) {
        for (int j = 0; j < colors; j++) {
          if (colorToMin[j] < a) {
            canPaintSameColor = true;
            colorToMin[j] = a;
            if (totalMin == -1) {
              totalMin = a;
            } else {
              totalMin = Math.min(totalMin, a);
            }
            break;
          }
        }
      }
      if (!canPaintSameColor) {
        colorToMin[colors] = a;
        if (totalMin == -1) {
          totalMin = a;
        } else {
          totalMin = Math.min(totalMin, a);
        }
        colors++;
      }
    }
    pw.println(colors);
  }
}
//  [cpp]
#include<bits/stdc++.h>
#define REP(i,n) for(int (i)=0 ;(i)<(n);(i)++)
#define REPR(i,n) for(int (i)=(n);(i)>=0;(i)--)
#define FOR(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define ALL(x) x.begin(),x.end()
#define REVERSE(x) reverse(x.begin(),x.end())
#define SORT(x,n) sort(x,x)
#define P pair<int,int>
typedef long long LL;
const int INF=1000000007;
using namespace std;
int gcd(int a,int b){
  if(a%b==0){return b;}
  else{return gcd(b,a%b);}
}

int main(){
int N;
cin>>N;
vector<int> a(N);
REP(i,N){
    cin>>a[i];
}
int ans=0;
for(int i=0;i<N;i++){
    if(a[i]!=-1){
        ans++;
        int index=i;
        int counter=i+1;
        while(index<N){
            while(a[index]>=a[counter]){
            counter++;
            }
          a[index]=-1;
          index=counter;
        }
}
}
cout<<ans;
}
//  [cpp]
#include<cstdio>
#include<cstdlib>
#define rnt register int
using namespace std;
int d[100001];
int n,x;
int main()
{
	scanf("%d",&n);
	for(rnt i=0;i<100001;i=-~i)
		d[i]=-1;
	for(rnt i=0;i<n;i=-~i)
	{
		scanf("%d",&x);
		for(rnt j=0;;j=-~j)
			if(x>d[j])
			{
				d[j]=x;
				break;
			}
	}
	for(rnt i=0;i<=n;i++)
		if(d[i]==-1)
		{
			printf("%d\n",i);
			return 0; 
		}
}
//  [c]

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>

#define YYDBG 0

#if YYDBG==1
#define PRINTF(...) printf(__VA_ARGS__);
#define FOR for
#define IF if
#define ELSE else
#else
#define PRINTF(...) 
#define FOR(...)
#define IF(...)
#define ELSE 
#endif


typedef struct _ll {
    struct _ll * p;
    struct _ll * n;
    int          c;
    int          v;
}ll;

#define PD(_A,_B) PRINTF("%d,%d -> ", (_A), (_B));

#define LAN(_A,_C,_V) {(_A)=malloc(sizeof(ll));(_A)->c=(_C);(_A)->v=(_V);}
#define LAL(_A,_C,_V) ({if((_A)!=NULL){(_A)->n=malloc(sizeof(ll));(_A)->n->p=(_A);(_A)->n->c=(_C);(_A)->n->v=(_V);}(_A)->n;})
#define LAE(_A,_C,_V) ({ll *c;c=(_A);if(c!=NULL){while(c->n!=NULL){c=c->n;};c->n=malloc(sizeof(ll));c->n->p=c;c->n->v=(_V);}(c->n);})

#define LPT(_A) {ll *c;c=(_A);PRINTF("dump : ");while(c!=NULL){PD(c->c,c->v);c=c->n;}PRINTF("\n");}

#define LAD(_A,_C,_V) {ll *c,*t;c=(_A);if(c!=NULL){while(c->n != NULL){if(c->v>=(_V)){break;}c=c->n;};t=c->n;c->n=malloc(sizeof(ll));c->n->n=t;c->n->p=c;c->n->c=(_C);c->n->v=(_V);}}
#define LAA(_A,_C,_V) {ll *c,*t;c=(_A);if(c!=NULL){while(c->n != NULL){if(c->n->v>(_V)){break;}c=c->n;};t=c->n;c->n=malloc(sizeof(ll));c->n->n=t;c->n->p=c;c->n->c=(_C);c->n->v=(_V);}}
int inputs[100000];
int N;
int main(void) {
    int i,j,k;
    int count;
    int max;
    ll *top, *curr, *last;

    LAN(top,-1,999999);
    last = top;

    scanf("%d\n", &N);
    for(i=0;i<N;i++) { 
        scanf("%d\n", &(inputs[i]));
    }

    count = 0;
    max = inputs[N-1];
    for(i=N-1;i>=0;i--) {
        int v = inputs[i];
        PRINTF("[%d] ", count);

        curr = NULL;
        if ( v < last->v ) {
            PRINTF("YYDBG");

        curr = top->n;
        while(curr != NULL) {
            if(curr->v > v) {
                PRINTF("ll (%d, %d)[%d]\n", curr->c, curr->v, v);
//                colors[i] = curr->c;
                curr->v = v;
                break;
            }
            curr = curr->n;
        }
        }


        if(curr == NULL) {
            count++;
            last = LAL(last, count, inputs[i]);
//            LPT(top);

        } else { PRINTF("yydbg\n");}
    }

    printf("%d\n", count);
    return 0;
}
//  [c]
#include <stdio.h>
#define N 100000

int main(void){
    int n;
    int a[N];
    int memo[N];
    int i,j,k,tmp;
    for(i = 0; i < N; i++){
        memo[i] = -1;
    }
    
    scanf("%d", &n);
    for(i = 0; i < n; i++){
        scanf("%d", &a[i]);
    }
    
    memo[0] = a[0];
    for(i = 1; i < n; i++){
        j = 0;
        while(a[i] <= memo[j]){
            j++;
        }
        memo[j] = a[i];
        tmp = memo[j];
        k = j;
        while(tmp > memo[k] && k >= 1){
            memo[k] = memo[k-1];
            k--;
        }
        memo[k] = tmp;
    }
    
    for(i = 0; i < n; i++){
        if(memo[i] == -1){
            break;
        }
    }
    
    printf("%d", i);
    return 0;
}
//  [c]
#include <stdio.h>
#define rep(i,n)for(int i=0;i<(int)(n);i++)
int main(){
	int n,color,a[100002],b[100002];
	scanf("%d",&n);
	rep(i,n) scanf("%d",&a[i]);//入力終
	rep(i,n+1) b[i]=-1;
	rep(i,n){
		color=0;
		while(a[i]<=b[color]){color++;}
		b[color]=a[i];
	}
	rep(i,n+1){
		if(b[i]==-1){printf("%d",i); return 0;}
	}
}
//  [javascript]
function Main(input) {
  input=input.split("\n");
  if(input[input.length-1]===''){
    input.pop();
  }
  const N=input[0]-0;
  var colors=[];
  var temp;
  var min,max,mid;
  for(var i=1;i<input.length;i++){
    temp=input[i]-0;
    if(colors.length===0){
      colors.push(temp);
      continue;
    }
    if(temp<=colors[0]){
      colors.unshift(temp);
      continue;
    }
    if(temp>colors[colors.length-1]){
      colors[colors.length-1]=temp;
      continue;
    }
    min=0;
    max=colors.length-1;
    while(max-min>1){
      mid=Math.floor((max+min)/2);
      if(colors[mid]<temp){
        min=mid;
      }else{
        max=mid;
      }
    }
    colors[min]=temp;
  }
  console.log(colors.length);
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())

	res := make([]int, 0, n)

	min := math.MaxInt64
	max := -1

	for i := 0; i < n; i++ {
		sc.Scan()
		v, _ := strconv.Atoi(sc.Text())

		var ok bool

		if v > min {
			for i, r := range res {
				if r >= v {
					continue
				}
				res[i] = v
				ok = true
				if v > max {
					max = v
				}
				break
			}
		}

		if !ok {
			res = append(res, v)
			if v < min {
				min = v
			}
		}
	}

	fmt.Println(len(res))
}
//  [go]
package main

import (
	"fmt"
	"sort"
)

func pow(x, n, mod int64) int64 {
	if n == 0 {
		return 1
	}
	xx := x * x % mod
	r := pow(xx, n/2, mod)
	if n%2 == 1 {
		r = x * r % mod
	}
	return r
}

const mod = 1e9 + 7

func main() {
	var n int
	fmt.Scan(&n)
	var a []int
	for i := 0; i < n; i++ {
		var t int
		fmt.Scan(&t)
		a = append(a, -t)
	}
	var b []int
	for _, t := range a {
		i := sort.SearchInts(b, t)
		bl := len(b)
		// fmt.Println(b, t, i)
		if i == bl {
			b = append(b, t-1)
		} else {
			b[i] = t - 1
		}
	}
	fmt.Println(len(b))
}
//  [go]
package main

import "fmt"

const inf int = 1e18

func main() {
	var n int
	fmt.Scan(&n)
	as := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&as[i])
	}

	dp := make([]int, n)
	for i := 0; i < n; i++ {
		dp[i] = inf
	}

	for i := 0; i < n; i++ {
		a := as[n-i-1]
		k := upperBound(dp, a)
		dp[k] = a
	}

	ans := 0
	for i := 0; i < n; i++ {
		if dp[i] < inf {
			ans++
		}
	}

	fmt.Println(ans)
}

func upperBound(a []int, x int) int {
	lb, ub := -1, len(a)
	for ub-lb > 1 {
		m := (lb + ub) / 2
		if a[m] <= x {
			lb = m
		} else {
			ub = m
		}
	}
	return ub
}
//  [ruby]
# 昇順でソートされている前提
def priority_push(array:, num:)
  index = array.bsearch_index { |i| i <= num}
  if index.nil?
    array.push(num)
  else
    array.insert(index, num)
  end
end

# 昇順でソートされていて、indexに値がある前提
def priority_update(array:, index:, num:)
  array.delete_at(index)
  priority_push(array: array, num: num)
end

N = gets.to_i
arr = N.times.map{ gets.to_i }
stacks = [arr.shift]

arr.each do |i|
  overwrite_index = stacks.bsearch_index { |target| target < i }
  if overwrite_index.nil?
    priority_push(array: stacks, num: i)
  else
    priority_update(array: stacks, index: overwrite_index, num: i)
  end
end
puts stacks.count
//  [ruby]
N = gets.chomp.to_i
A = []
N.times do |i|
  A << gets.chomp.to_i
end

q = []
A.each do |a|
  if q.empty?
    q << a
  elsif q[-1] < a
    q[-1] = a
  else
    i = q.bsearch_index { |v| v >= a }
    if i.zero?
      q.insert(0, a)
    else
      q[i-1] = a
    end
  end
end
puts q.size
//  [ruby]
N = gets.to_i
A = N.times.map { gets.to_i }

def bsearch(ng:, ok:, &is_ok)
  while (ok - ng).abs > 1
    mid = (ok + ng) / 2
    if is_ok.call(mid)
      ok = mid
    else
      ng = mid
    end
  end
  ok
end

list = []
A.each do |a|
  i = bsearch(ng: list.size, ok: -1) do |j|
    list[j] < a
  end
  if i == -1
    list.unshift(a)
  else
    list[i] = a
  end
end
puts list.size
//  [rust]
//use itertools::Itertools;
use std::cmp;
use std::collections::BTreeMap;
use std::collections::BTreeSet;
use std::collections::BinaryHeap;
use std::collections::HashMap;
use std::collections::HashSet;
use std::collections::VecDeque;
use std::io::Read;
use std::usize::MAX;

macro_rules! input {(source = $s:expr, $($r:tt)*) => {let mut iter = $s.split_whitespace();let mut next = || { iter.next().unwrap() };input_inner!{next, $($r)*}};($($r:tt)*) => {let stdin = std::io::stdin();let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));let mut next = move || -> String{bytes.by_ref().map(|r|r.unwrap() as char).skip_while(|c|c.is_whitespace()).take_while(|c|!c.is_whitespace()).collect()};input_inner!{next, $($r)*}};}
macro_rules! input_inner {($next:expr) => {};($next:expr, ) => {};($next:expr, $var:ident : $t:tt $($r:tt)*) => {let $var = read_value!($next, $t);input_inner!{$next $($r)*}};}
macro_rules! read_value {($next:expr, ( $($t:tt),* )) => {( $(read_value!($next, $t)),* )};($next:expr, [ $t:tt ; $len:expr ]) => {(0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()};($next:expr, chars) => {read_value!($next, String).chars().collect::<Vec<char>>()};($next:expr, usize1) => {read_value!($next, usize) - 1};($next:expr, [ $t:tt ]) => {{let len = read_value!($next, usize);(0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()}};($next:expr, $t:ty) => {$next().parse::<$t>().expect("Parse error")};}

fn solve() {
    input! {
        n: usize,
        a: [usize;n]
    }

    let mut max_nums = vec![];

    for &i in &a {
        let len = max_nums.len();
        match bin_search(&max_nums, i) {
            MAX => {
                max_nums.insert(0, i);
            }
            0 => {
                if max_nums[0] < i {
                    max_nums[0] = i;
                } else {
                    max_nums.insert(0, i);
                }
            }
            num => {
                max_nums[num] = i;
            }
        }

        //println!("{:?}", max_nums);
    }

    println!("{}", max_nums.len());
}

fn main() {
    let thd = std::thread::Builder::new().stack_size(104_857_600);
    thd.spawn(|| solve()).unwrap().join().unwrap();

    /*
    // 入力を一括で読み込む場合
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();
    let mut input = buf.split_whitespace();

    // inputに対しnext()で読み込んでいく
    let q: usize = input.next().unwrap().parse().unwrap();
    */
}

const LARGE_PRIME: u64 = 1_000_000_007;

// @〜でsnippet
// 二分探索 vは単調増加 v[x] <= aとなる最小のxを返す
fn bin_search(v: &[usize], a: usize) -> usize {
    if v.is_empty() || a <= v[0] {
        return MAX;
    }
    let mut min = 0;
    let mut max = v.len();
    while max - min > 1 {
        let mid = (min + max) / 2;
        if v[mid] < a {
            min = mid;
        } else {
            max = mid;
        }
    }
    min
}
//  [rust]
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        #[cfg(debug_assertions)]
        writeln!(&mut std::io::stderr(), concat!("[DEBUG] ", $(stringify!($a), "={:?} "),*), $($a),*);
    }
}

#[allow(unused_imports)]
use std::cmp::{min, max};
#[allow(unused_imports)]
use std::io::{stdout, stdin, BufWriter, Write};

pub fn lower_bound<T: Ord>(a: &Vec<T>, x: &T) -> usize {
    use std::cmp::Ordering;
    let mut l = 0;
    let mut r = a.len();
    while l != r {
        let m = l + (r - l) / 2;
        match a[m].cmp(x) {
            Ordering::Less => l = m + 1,
            Ordering::Equal | Ordering::Greater => r = m,
        }
    }
    l
}

fn main() {
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(out,$($format)*).unwrap());
    }

    input!{
      n: usize,
      aa: [u64; n],
    }

    use std::collections::VecDeque;
    let mut q = vec![];
    for a in aa {
        let idx = lower_bound(&q, &a);
        if idx > 0 {
            q[idx-1] = a;
        } else if idx == 0 {
            q.insert(0, a);
        }
        debug!(q);
    }
    puts!("{}\n", q.len());
}
//  [rust]
//use itertools::Itertools;
use std::cmp;
use std::collections::BTreeMap;
use std::collections::BTreeSet;
use std::collections::BinaryHeap;
use std::collections::HashMap;
use std::collections::HashSet;
use std::collections::VecDeque;
use std::io::Read;
use std::usize::MAX;

macro_rules! input {(source = $s:expr, $($r:tt)*) => {let mut iter = $s.split_whitespace();let mut next = || { iter.next().unwrap() };input_inner!{next, $($r)*}};($($r:tt)*) => {let stdin = std::io::stdin();let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));let mut next = move || -> String{bytes.by_ref().map(|r|r.unwrap() as char).skip_while(|c|c.is_whitespace()).take_while(|c|!c.is_whitespace()).collect()};input_inner!{next, $($r)*}};}
macro_rules! input_inner {($next:expr) => {};($next:expr, ) => {};($next:expr, $var:ident : $t:tt $($r:tt)*) => {let $var = read_value!($next, $t);input_inner!{$next $($r)*}};}
macro_rules! read_value {($next:expr, ( $($t:tt),* )) => {( $(read_value!($next, $t)),* )};($next:expr, [ $t:tt ; $len:expr ]) => {(0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()};($next:expr, chars) => {read_value!($next, String).chars().collect::<Vec<char>>()};($next:expr, usize1) => {read_value!($next, usize) - 1};($next:expr, [ $t:tt ]) => {{let len = read_value!($next, usize);(0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()}};($next:expr, $t:ty) => {$next().parse::<$t>().expect("Parse error")};}

fn solve() {
    input! {
        n: usize,
        a: [usize;n]
    }

    let mut max_nums = vec![];

    for &i in &a {
        match bin_search(&max_nums, i) {
            MAX => {
                max_nums.insert(0, i);
            }
            0 => {
                if max_nums[0] < i {
                    max_nums[0] = i;
                } else {
                    max_nums.insert(0, i);
                }
            }
            num => {
                max_nums[num] = i;
            }
        }

        //println!("{:?}", max_nums);
    }

    println!("{}", max_nums.len());
}

fn main() {
    let thd = std::thread::Builder::new().stack_size(104_857_600);
    thd.spawn(|| solve()).unwrap().join().unwrap();

    /*
    // 入力を一括で読み込む場合
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();
    let mut input = buf.split_whitespace();

    // inputに対しnext()で読み込んでいく
    let q: usize = input.next().unwrap().parse().unwrap();
    */
}

const LARGE_PRIME: u64 = 1_000_000_007;

// @〜でsnippet
// 二分探索 vは単調増加 v[x] <= aとなる最小のxを返す
fn bin_search(v: &[usize], a: usize) -> usize {
    if v.is_empty() || a <= v[0] {
        return MAX;
    }
    let mut min = 0;
    let mut max = v.len();
    while max - min > 1 {
        let mid = (min + max) / 2;
        if v[mid] < a {
            min = mid;
        } else {
            max = mid;
        }
    }
    min
}
//  [python]
sx,sy,tx,ty=map(int,input().split())
ans=""
ans+="R"*(tx-sx)
ans+="U"*(ty-sy)
ans+="L"*(tx-sx)
ans+="D"*(ty-sy+1)
ans+="R"*(tx-sx+1)
ans+="U"*(ty-sy+1)
ans+="LU"
ans+="L"*(tx-sx+1)
ans+="D"*(ty-sy+1)
ans+="R"
print(ans)
//  [python]
import sys
import numpy as np
import random
from decimal import Decimal
import itertools
import re
import bisect
from collections import deque, Counter
from functools import lru_cache
from numba import jit

sys.setrecursionlimit(10**9)
INF = 10**13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
def SERIES(n): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ')
def GRID(h,w): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ').reshape(h,-1)[:,:w]
def GRIDfromString(h,w): return np.frombuffer(sys.stdin.buffer.read(), 'S1').reshape(h,-1)[:,:w]
MOD = 1000000007

def main():
	sx, sy, tx, ty = LI()
	print("R"*(tx-sx)+"U"*(ty-sy)+"L"*(tx-sx)+"D"*(ty-sy+1)+"R"*(tx-sx+1)+"U"*(ty-sy+1)+"L"+"U"+"L"*(tx-sx+1)+"D"*(ty-sy+1)+"R")



if __name__ == '__main__':
    main()
//  [python]
sx,sy, tx,ty = map(int, raw_input().split())
def f(sx,sy,tx,ty):
	path = ['D']
	path += ['R'] * (abs(tx - sx) + 1)
	path += ['U'] * (abs(ty - sy) + 1)
	path += ['L'] * (abs(tx - sx) + 1)
	path += ['D'] * (abs(ty - sy))
	return path

	
def g(sx,sy,tx,ty):
	path = []
	path += ['R'] * (abs(tx - sx))
	path += ['U'] * (abs(ty - sy) + 1)
	path += ['L'] * (abs(tx - sx)+1)
	path += ['D'] * (abs(ty - sy)+1) 
	return path + ['R']


print ''.join(f(sx,sy, tx,ty) + g(sx,sy,tx,ty))
//  [java]
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int sx = sc.nextInt();
    int sy = sc.nextInt();
    int tx = sc.nextInt();
    int ty = sc.nextInt();
    int N = tx - sx + 1;
    int M = ty - sy + 1;
    String res = "";
    for(int i = 0; i < N - 1; i++) {
      res += "R";
    }
    for(int i = 0; i < M; i++) {
      res += "U";
    }
    for(int i = 0; i < N; i++) {
      res += "L";
    }
    for(int i = 0; i < M; i++) {
      res += "D";
    }
    res += "RD";
    for(int i = 0; i < N; i++) {
      res += "R";
    }
    for(int i = 0; i < M; i++) {
      res += "U";
    }
    for(int i = 0; i < N; i++) {
      res += "L";
    }
    for(int i = 0; i < M - 1; i++) {
      res += "D";
    }
    System.out.println(res);
  }
}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Main {

    void solve() throws IOException {
        int[] s = nia(4);
        int dx = s[2] - s[0];
        int dy = s[3] - s[1];

        String ans = "";
        for (int i = 0; i < dx; i++) {
            ans += "R";
        }
        for (int i = 0; i < dy; i++) {
            ans += "U";
        }
        for (int i = 0; i < dx; i++) {
            ans += "L";
        }
        for (int i = 0; i < dy; i++) {
            ans += "D";
        }
        ans += "D";
        for (int i = 0; i < dx + 1; i++) {
            ans += "R";
        }
        for (int i = 0; i < dy + 1; i++) {
            ans += "U";
        }
        ans += "L";
        ans += "U";
        for (int i = 0; i < dx + 1; i++) {
            ans += "L";
        }
        for (int i = 0; i < dy + 1; i++) {
            ans += "D";
        }
        ans += "R";
        out.println(ans);
    }

    String ns() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine(), " ");
        }
        return tok.nextToken();
    }

    int ni() throws IOException {
        return Integer.parseInt(ns());
    }

    long nl() throws IOException {
        return Long.parseLong(ns());
    }

    double nd() throws IOException {
        return Double.parseDouble(ns());
    }

    String[] nsa(int n) throws IOException {
        String[] res = new String[n];
        for (int i = 0; i < n; i++) {
            res[i] = ns();
        }
        return res;
    }

    int[] nia(int n) throws IOException {
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            res[i] = ni();
        }
        return res;
    }

    long[] nla(int n) throws IOException {
        long[] res = new long[n];
        for (int i = 0; i < n; i++) {
            res[i] = nl();
        }
        return res;
    }

    class INA {
        int[][] a;

        INA(int n, int m) throws IOException {
            this(n, m, -1);
        }

        INA(int n, int m, int t) throws IOException {
            a = new int[m][n];

            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    a[j][i] = ni() + t;
                }
            }
        }

        int[] get(int i) {
            return a[i - 1];
        }
    }

    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer tok;

    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        tok = new StringTokenizer("");
        Main main = new Main();
        main.solve();
        out.close();
    }
}
//  [java]
import java.util.*;


public class Main{
           
    public static void main(String[] args){            
        
       Scanner sc = new Scanner(System.in);               
      
       int sx = sc.nextInt();
       int sy = sc.nextInt();
       int tx = sc.nextInt();
       int ty = sc.nextInt();
       
       String S = "";
       
       for(int i = 0;i < tx-sx;i++){
           S += "R";
       }
       
       for(int i = 0 ;i < ty-sy;i++){
           S += "U";
       }
       
       for(int i = 0 ; i < tx-sx;i++){
           S += "L";
       }
       
       for(int i= 0 ;i < ty-sy;i++){
           S += "D";
       }
       
       S += "D";
       
        for(int i = 0;i < tx-sx + 1;i++){
           S += "R";
       }
       
        for(int i = 0 ;i < ty-sy + 1;i++){
           S += "U";
       }
        S += "L";
        S +="U";
        
        for(int i = 0 ; i < tx-sx + 1;i++){
           S += "L";
       }
        
        for(int i= 0 ;i < ty-sy+1;i++){
           S += "D";
       }

        S += "R";
        
        System.out.println(S);
       
    }
                                       
}