Harryxun/stf_run huggingface dataset:
s=int(input())
print("Good" if s[0]==s[1] or s[1]==s[2] or s[2]==s[3] else "Bad")

### FIXED CODE ###

s=input()
print("Bad" if s[0]==s[1] or s[1]==s[2] or s[2]==s[3] else "Good")
h,w = map(int,input(). split())
if (h == 1) or (w == 1):
  answer = 1
  print(answer)
elif (h%2 = 1) and (w%2 = 1):
  a = (h//2)*(w//2)
  b = ((h//2)+1)*((w//2)+1)
  answer = a + b
  print(answer)
else:
  answer = h*w/2
  print(answer)

### FIXED CODE ###

h,w = map(int,input(). split())
if (h == 1) or (w == 1):
  answer = 1
  print(answer)
elif (h%2 == 1) and (w%2 == 1):
 
  answer = ((h*w)+1)//2
  print(answer)
else:
  answer = h*w//2
  print(answer)
n, k = map(int, input().split())
a = list(map(int, input().split()))

idx = a[0]
hist = [1]
for _ in range(k):
    if idx in hist:
        hist.append(idx)
        break
    hist.append(idx)
    idx = a[idx-1]
    
l_start, l_end = [i for i, v in enumerate(hist) if hist[-1]==v]

surplus = (k-l_start) % (l_end - l_start)
print(hist[l_start+surplus])

### FIXED CODE ###

n, k = map(int, input().split())
a = list(map(int, input().split()))

idx = a[0]
hist = [1]
passed = [0] * n
flag = 0
for i, _ in enumerate(range(k), start=1):
    if passed[idx-1] == 1:
        hist.append(idx)
        passed[idx-1] = 1
        flag = 1
        break
    hist.append(idx)
    passed[idx-1] = 1
    idx = a[idx-1]
    
    
if flag:
    l_start, l_end = hist.index(idx), i
    surplus = (k - l_start) % (l_end - l_start)
    print(hist[l_start + surplus])
else:
    print(hist[-1])
N, D = map(int, input().split())
t = []
count = 0
sum = 0
for i in range(N):
    t.append(list(map(int, input().split())))
for i in range(0, N-1):
    for j in range(i + 1, N):
      for d in range(D):
        sum += pow(t[i][d] - t[j][d], 2)
        sqrt = math.sqrt(sum)
      print(sum)
      print(sqrt)
      if sqrt == int(sqrt):
        count += 1
      sum = 0
      sqrt = 0
print(count)

### FIXED CODE ###

import math
N, D = map(int, input().split())
t = []
for i in range(N):
    t.append(list(map(int, input().split())))
count = 0
sum = 0
for i in range(0, N-1):
    for j in range(i + 1, N):
      for d in range(D):
        sum += pow(t[i][d] - t[j][d], 2)
        sqrt = math.sqrt(sum)
      if sqrt == int(sqrt):
        count += 1
      sum = 0
      sqrt = 0
print(count)
N = input()
A = list(map(int, input().split()))
import numpy as np
X = np.prod(A)
if X < 10**18 :
    print(X)
else :
    print('-1')

### FIXED CODE ###

a , b = input() . split()
c = int(a) *int(b)
print(c)
N,Q = map(int,input().split())
S = input()
A = []
L = []

for i  in range(N-1):
    if S[i]=='A' and S[i+1]=='C':
        A.append(i+2)
for i in range(Q):
    L=list(map(int,input().split()))
    minA=bisect_left(A,L[0])
    maxA=bisect_left(A,L[1])
    print(maxA-minA)



### FIXED CODE ###

from bisect import bisect_left, bisect_right

N,Q = map(int,input().split())
S = input()
A = []
L = []

for i  in range(N-1):
    if S[i]=='A' and S[i+1]=='C':
        A.append(i)
        
for i in range(Q):
    L=list(map(int,input().split()))
    minA=bisect_left(A,L[0]-1)
    maxA=bisect_left(A,L[1]-1)
    print(maxA-minA)
Q = int(input())
 
# 素数表
n = 100000
P = [False] * n
P[2] = True
for i in range(3, n, 2):
    k = True
    for j in range(3, int(math.sqrt(i)) + 1, 2):
        if i % j == 0:
            k = False
            break
    if k:
        P[i] = True
 
# Nと(N+1)÷2が素数か否か
a = [0] * n
for i in range(1, n, 2):
    j = (i + 1) // 2
    if P[i] and P[j]:
        a[i] = 1
# 累積和
for i in range(n - 1):
    a[i + 1] += a[i]
 
for _ in range(Q):
    l, r = map(int, input().split())
    print(a[r] - a[l - 1])

### FIXED CODE ###

import math
 
Q = int(input())
 
# 素数表
n = 100000
P = [False] * n
P[2] = True
for i in range(3, n, 2):
    k = True
    for j in range(3, int(math.sqrt(i)) + 1, 2):
        if i % j == 0:
            k = False
            break
    if k:
        P[i] = True
 
# Nと(N+1)÷2が素数か否か
a = [0] * n
for i in range(1, n, 2):
    j = (i + 1) // 2
    if P[i] and P[j]:
        a[i] = 1
# 累積和
for i in range(n - 1):
    a[i + 1] += a[i]
 
for _ in range(Q):
    l, r = map(int, input().split())
    print(a[r] - a[l - 1])
n, m  = map(int, input().split()) 

A = [int(a) for a in input().strip()]

a0 = 1 
a1 = 1 if A[0] !=1 else 0 

ANS=[0]*(n+1)
ANS[0]=a0
ANS[1]=a1
Next = A[1:] if a1 !=0 else A
next = 0
for i in range(2,n+1) :
  if i == Next[next]:
    A[i] = 0
    next += 1 
  else:
    A[i] = A[i-2] + A[i-1] 
  
print(A[n])

### FIXED CODE ###

n, m  = map(int, input().split())

A = [int(input().strip()) for _ in range(m)]

a0 = 1
if len(A) == 0:
  a1 = 1
else:
  a1 = 1 if A[0] !=1 else 0
mod = 1000000007

ANS=[0]*(n+1)
ANS[0]=a0
ANS[1]=a1
Next = A if a1 !=0 else A[1:]
next = 0
for i in range(2, n+1):
    if next <= len(Next)-1:
        if i == Next[next]:
            ANS[i] = 0
            next += 1
            continue
    ANS[i] = ANS[i-2] + ANS[i-1]

print(ANS[n]%mod)
import math
n=int(input())
lst=list(map(int,input().split()))
xlst=list(reversed(lst))
#1~5と6のgcdは1~6のgcd
#i番目の左側と右側のgcdを求める
#left[i-1]はlstのi番目までのgcd
#xright[i]はlstのnからi-
#lstのi+1番目は右から見たらn-i+1番目



left=[lst[0]]
xright=[lst[n-1]]
for i in range(1,len(lst)):
    left.append(math.gcd(left[i-1],lst[i]))

for i in reversed(range(0,len(lst)-1)):
    xright.append(math.gcd(xright[n-i-2],lst[i]))

print(xright,left)
#i-1番目までの左からのgcdはleft[i-2]
#i＋1番目以上のgcdは right[i+2]
result=1
for i in range(1,n-1):
    a=math.gcd(left[i-1],xright[i-1])
    if a>result:
        result=a
print(max(result,xright[n-2],left[n-2]))


### FIXED CODE ###

import fractions
n=int(input())
lst=list(map(int,input().split()))
xlst=list(reversed(lst))
#1~5と6のgcdは1~6のgcd
#i番目の左側と右側のgcdを求める
#left[i-1]はlstのi番目までのgcd
#xright[i]はlstのnからi-
#lstのi+1番目は右から見たらn-i+1番目



left=[lst[0]]
xright=[lst[n-1]]
for i in range(1,len(lst)):
    left.append(fractions.gcd(left[i-1],lst[i]))

for i in reversed(range(0,len(lst)-1)):
    xright.append(fractions.gcd(xright[n-i-2],lst[i]))


#i-1番目までの左からのgcdはleft[i-2]
#i＋1番目以上のgcdは right[i+2]
result=1
for i in range(1,n-1):
    a=fractions.gcd(left[i-1],xright[n-i-2])
    if a>result:
        result=a
print(max(result,xright[n-2],left[n-2]))
a, b, c = map(int, input().split())
lis = [c, a, b]
print(" ".join(lis))

### FIXED CODE ###

a, b, c = input().split()
lis = [c, a, b]
print(" ".join(lis))
N = list(map(int, input()))
x = 0
for i in range(N // 2):
  if N[i] != N[-i]:
    print('No')
    x = 1
    break
if x == 0:
  prin('Yes')


### FIXED CODE ###

N = list(map(int, input()))
x = 0
for i in range(len(N) // 2):
  if N[i] != N[-i-1]:
    print('No')
    x = 1
    break
if x == 0:
  print('Yes')
tate =int(input());
yoko=int(input());
arr = [i+1 for i in range(tate)]
for j in range(yoko):
 rep1,rep2=input().split();
 rep1=int(rep1)-1
 rep2=int(rep2)-1
 arr[rep1],arr[rep2] = arr[rep2],arr[rep1]
for k in range(tate):
 print(arr[k])


### FIXED CODE ###

tate =int(input())
yoko=int(input())
arr = [i+1 for i in range(tate)]
for j in range(yoko):
    rep1,rep2=input().split(",")
    rep1=int(rep1)-1
    rep2=int(rep2)-1
    arr[rep1],arr[rep2] = arr[rep2],arr[rep1]

for k in range(tate):
    print(arr[k])
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007
#A
def A():
    t,x = LI()
    print(t/x)

#B
def B():
    n= II()
    a = LI()
    m = max(a)
    if m >= sum(a)-m:
        print("No")
    else:
        print("Yes")


#C
def C():
    n,m = LI()
    x = LI()
    x.sort()
    l = [x[i+1]-x[i] for i in range(m-1)]
    l.sort()
    l = l[::-1]
    ans = sum(l[max(n-1,0):])
    print(ans)

#D
def D():
    n,k = LI()
    a = LI()
    k = list(map(int,list(bin(k)[2:])))
    l = len(k)
    for i in range(n):
        a[i] = list(map(int,list(bin(a[i])[2:])))
        l = max(l,len(a[i]))
    for i in range(n):
        for j in range(l-len(a[i])):
            a[i].insert(0,0)
    for j in range(l-len(k)):
        k.insert(0,0)
    s = [[0,0] for i in range(l)]
    pow2 = [1 for i in range(l)]
    for i in range(l-1)[::-1]:
        pow2[i] = pow2[i+1]*2
    for i in a:
        for j in range(l):
            s[j][0] += pow2[j]*i[j]
            s[j][1] += pow2[j]*(not i[j])
    dp = [0 for i in range(l+1)]
    small = False
    for i in range(l):
        if not small:
            if not k[i]:
                dp[i+1] += dp[i]+s[i][0]
            else:
                if s[i][0] >= s[i][1]:
                    dp[i+1] += dp[i]+s[i][0]
                    small = True
                else:
                    dp[i+1] += dp[i]+s[i][1]
        else:
            dp[i+1] += dp[i]+max(s[i])
    print(dp[l])

#E
if __name__ == "__main__":
    B()

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T


### FIXED CODE ###

#!usr/bin/env python3
from collections import defaultdict
import math
def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()
def IIR(n): return [II() 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)]
mod = 1000000007

#A
"""
t,x = LI()
print(t/x)
"""

#B
n = II()
a = LI()
m = max(a)
if m >= sum(a)-m:
    print("No")
else:
    print("Yes")
#C

#D

#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T
l,r=map(int,input().split())
lst=list(range(l,r+1))
lst1=lst[:min(2020,r-l+2)]
def div(n):
  return n%2019
lst1=map(div,lst1)
lst1.sort()
print(lst1[0]*lst1[1])
  


### FIXED CODE ###

import sys
l,r=map(int,input().split())

if 2018<=r-l:
  print(0)
  sys.exit()

L=l%2019
R=r%2019
m=2018

if L>R:
  print(0)
  sys.exit()

  
for i in range(L,R):
  for j in range(i+1,R+1):
    m=min((i*j)%2019,m)

print(m)
N = int(input())
a = list(map(int, input().split()))
values=[]
for i in range(min(a), max(a)+1):
    values.append(a.count(i))
    
max_value=0
for i in range(len(values)-2):
    max_value = max(max_value, values[i]+values[i+1]+values[i+2])
print(max_value)

### FIXED CODE ###

X, t =list(map(int, input().split( )))
print(max(X-t,0))
import sys
input = sys.stdin.readline

L,N=map(int,input().split())
X=[0]+[int(input()) for i in range(N)]

def LENG(a,b,start):
    if b==0:
        if start>a:
            return a
        else:
            return L-a

    if a>b:
        a,b=b,a

    return a+L-b

MIN=1
MAX=N


ANS=0
while MAX-MIN>1:

    start=N//2
    ANSX=0
    if start==0 or start<0 or start>N:
        continue

    s=start
    t=(s+(-1)**0)%(N+1)
    ANS1=0


    
    for i in range(2,N+3):
        ANS1+=LENG(X[s],X[t],X[start])
        #print(s,t,i,ANS1)
        
        s,t=t,(t-i*((-1)**i))%(N+1)

        

        if s==0:
            break
    #print(ANS1)

    s=start
    t=(s-(-1)**0)%(N+1)
    ANS2=0
    for i in range(2,N+3):
        ANS2+=LENG(X[s],X[t],X[start])
        #print(s,t,i,ANS2)
        s,t=t,(t+i*((-1)**i))%(N+1)

        if s==0:
            break
    #print(ANS2)

    ANSX=max(ANS,ANS1,ANS2)
    
    start=N//2+1
    
    ANSY=0
    if start==0 or start<0 or start>N:
        continue

    s=start
    t=(s+(-1)**0)%(N+1)
    ANS1=0


    
    for i in range(2,N+3):
        ANS1+=LENG(X[s],X[t],X[start])
        #print(s,t,i,ANS1)
        
        s,t=t,(t-i*((-1)**i))%(N+1)

        

        if s==0:
            break
    #print(ANS1)

    s=start
    t=(s-(-1)**0)%(N+1)
    ANS2=0
    for i in range(2,N+3):
        ANS2+=LENG(X[s],X[t],X[start])
        #print(s,t,i,ANS2)
        s,t=t,(t+i*((-1)**i))%(N+1)

        if s==0:
            break
    #print(ANS2)

    ANSY=max(ANS,ANS1,ANS2)

    if ANSX>ANSY:
        MAX=N//2
    else:
        MIN=N//2+1

print(max(ANSX,ANSY))
    


### FIXED CODE ###

import sys
input = sys.stdin.readline

L,N=map(int,input().split())
X=[0]+[int(input()) for i in range(N)]

S=[]

for i in range(N):
    S.append(X[i+1]-X[i])
S.append(L-X[-1])

#print(S)

DIS=L-S[-1]
ANS=L-S[-1]
MINUS=0
PLUS=L-S[-1]

#print(DIS)

for i in range(N-1):
    if i%2==0:
        MINUS+=S[-i-2]
        PLUS+=S[-i//2-1]-S[-i-2]

    else:
        MINUS+=S[-i-2]-S[-i-1+i//2]
        PLUS-=S[-i-2]

    DIS+=PLUS-MINUS

    if ANS<DIS:
        ANS=DIS

    #print(DIS,PLUS,MINUS)

S=S[::-1]

DIS=L-S[-1]
MINUS=0
PLUS=L-S[-1]

#print(DIS)

for i in range(N-1):
    if i%2==0:
        MINUS+=S[-i-2]
        PLUS+=S[-i//2-1]-S[-i-2]

    else:
        MINUS+=S[-i-2]-S[-i-1+i//2]
        PLUS-=S[-i-2]

    DIS+=PLUS-MINUS

    if ANS<DIS:
        ANS=DIS

    #print(DIS,PLUS,MINUS)

print(ANS)
def main():
  s = input()
  if s = 'abc' or s = 'bca' or s = 'cab':
    print('Yes')
  else:
    print('No')

if __name__ == '__main__':
  main()

### FIXED CODE ###

def main():
  s = input()
  if s.count('a') == 1 and s.count('b') == 1 and s.count('c') == 1:
    print('Yes')
  else:
    print('No')

if __name__ == '__main__':
  main()
D,N=map(int,input())
if N==100:
  N=101
print((100**D)*N)

### FIXED CODE ###

D,N=map(int,input().split())
if N==100:
  N=101
print((100**D)*N)
n,y = map(int, input().split())
 
 
a,b,c = -1,-1,-1
 
for ai in range(n+1):
 
    if ai*1000>y:
        break
 
#    if ai * 1000 == y:
#        a,b,c = ai,0,0
#        break
 
    remain = n-ai
    for bi in range(remain+1):
        ci = remain - bi
        
        if y == ai * 1000 + bi * 5000 + ci * 10000:
            a,b,c = ai,bi,ci
 
print('{} {} {}'.format(c,b,a))
 

n,y = map(int, input().split())


a,b,c = -1,-1,-1

for ai in range(n+1):

    if ai*1000>y:
        break

    if ai * 1000 == y:
        a,b,c = ai,0,0
        break

    remain = n-ai
    for bi in range(remain+1):
        ci = remain - bi
        
        if y == ai * 1000 + bi * 5000 + ci * 10000:
            a,b,c = ai,bi,ci

print('{} {} {}'.format(c,b,a))


### FIXED CODE ###



n,y = map(int, input().split())

y //= 1000
a,b,c = -1,-1,-1

for ai in range(n+1):

    if ai*10> y:
        break

    if ai  == y:
        a,b,c = ai,0,0
        break

    remain = n-ai
    for bi in range(remain+1):
        ci = remain - bi
        
        if y == ai *10  + bi * 5 + ci :
            a,b,c = ai,bi,ci


print('{} {} {}'.format(a,b,c))
10
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split(' ')))
a = sorted(a)
ret = sum(a[n::2])
print(ret)
print(len({input().split()}))


### FIXED CODE ###

print(len(set(input().split())))
import math
import fractions

A , B , C , D = map(int,input().split())

if C == 1 or D == 1 :
    print(0)
elif min(C,D) > B :
    print(A - B + 1)
elif max(C,D) % min(C,D) == 0 :
    Z = min(C,D)
    ans = B - A + 1 - countX(Z)
    print(ans)
else :
    ans = B - A + 1

    # A以上B以下の数でXの倍数の個数
    def countX(X) :
        if X > B :
            return 0
        minX = max(math.ceil(A / X),0)
        maxX = max(math.floor(B / X),0)

        return maxX - minX + 1

    # 最小公倍数
    Z = int(C * D / fractions.gcd(C,D))

    ans -= countX(C)
    ans -= countX(D)
    ans += countX(Z)

    print(ans)



### FIXED CODE ###

import math
import fractions

# A以上B以下の数でXの倍数の個数
def countX(X) :
    if X > B :
        return 0

    minX = (A - 1) // X
    maxX = B // X

    return maxX - minX

A , B , C , D = map(int,input().split())

ans = B - A + 1

# 最小公倍数
Z = int(C * D / fractions.gcd(C,D))

ans -= countX(C)
ans -= countX(D)
ans += countX(Z)

print(int(ans))
N, M = map(int, input().split())
WA = [0] * N
AC = [0] * N
for i in range(M):
    p,s = input().split()
    p = int(p)
    if AC[p-1] == 0:
        if s == "AC":
            AC[p-1] = 1
        else:
            WA[p-1] += 1
wa = 0
for j in range(M):
    if AC[j] == 1:
        wa += WA[j]
print(sum(AC),wa)

### FIXED CODE ###

N, M = map(int, input().split())
WA = [0] * N
AC = [0] * N
for i in range(M):
    p,s = input().split()
    p = int(p)
    if AC[p-1] == 0:
        if s == "AC":
            AC[p-1] = 1
        else:
            WA[p-1] += 1
wa = 0
for j in range(N):
    if AC[j] == 1:
        wa += WA[j]
print(sum(AC),wa)
list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]
x, y = map( int, input().split() )
if ( x in list1 and y in list1 ) or ( x in list2 and y in list2 ) 
   or ( x in list3 and y in list3 ) : 
   print( "Yes" )
else :
   print( "No" )

### FIXED CODE ###

l1 = [1,3,5,7,8,10,12]
l2 = [4,6,9,11]
l3 = [2]
x, y = map( int, input().split() )
if ( x in l1 and y in l1 ) or ( x in l2 and y in l2 ) or ( x in l3 and y in l3 ) : 
   print( "Yes" )
else :
   print( "No" )
# ????????????????????°??????
import sys

def is_parallel(x1, y1, x2, y2, x3, y3, x4, y4):
    a1 = (y2 - y1) / (x2 - x1)
    a2 = (y4 - y3) / (x4 - x3)

    return a1 == a2

def main():
    n = int(sys.stdin.readline().strip())

    for _ in range(n):
        data = sys.stdin.readline().strip().split(' ')
        x1 = float(data[0])
        y1 = float(data[1])
        x2 = float(data[2])
        y2 = float(data[3])
        x3 = float(data[4])
        y3 = float(data[5])
        x4 = float(data[6])
        y4 = float(data[7])

        if is_parallel(x1, y1, x2, y2, x3, y3, x4, y4):
            print('YES')
        else:
            print('NO')
            
if __name__ == '__main__':
    main()

### FIXED CODE ###

# ????????????????????°??????
import sys
from decimal import Decimal

def is_parallel(x1, y1, x2, y2, x3, y3, x4, y4):
    d1x = x2 - x1
    d1y = y2 - y1
    d2x = x4 - x3
    d2y = y4 - y3

    return d1x * d2y == d1y * d2x

def main():
    n = int(sys.stdin.readline().strip())

    for _ in range(n):
        data = sys.stdin.readline().strip().split(' ')
        x1 = Decimal(data[0])
        y1 = Decimal(data[1])
        x2 = Decimal(data[2])
        y2 = Decimal(data[3])
        x3 = Decimal(data[4])
        y3 = Decimal(data[5])
        x4 = Decimal(data[6])
        y4 = Decimal(data[7])

        if is_parallel(x1, y1, x2, y2, x3, y3, x4, y4):
            print('YES')
        else:
            print('NO')
            
if __name__ == '__main__':
    main()
n = int(input())

class cell:
    def __init__(self, data, before, _next):
        self.data = data
        self.before = before
        self._next = _next

def search(ddl, data):
    for ind,item in enumerate(ddl):
        if item.data == data:
            return ind
    return None

def getItem(ddl, index):
    if len(ddl) > index and index >= 0:
        return ddl[index]
    return None

ddl = []
for i in range(n):
    inp = input().split()
    if len(inp) == 2:
        op, data = inp
        data = int(data)
    else: op, data = inp[0], None
    if op == 'insert':
        if len(ddl) == 0:
            _next = None
        else:
            _next = ddl[0]
        c = cell(data, None, _next)
        ddl = [c] + ddl
    elif op == 'delete':
        ind = search(ddl, data)
        if ind != None:
            ddl[ind - 1].next = getItem(ddl, ind + 1)
            if getItem(ddl, ind+1) is not None:
                ddl[ind + 1].prev = getItem(ddl, ind - 1)
            ddl = ddl[:ind] + ddl[ind+1:]
    elif op == 'deleteFirst':
        ddl = ddl[1:]
        ddl[0].prev = None
    elif op == 'deleteLast':
        ddl = ddl[:-1]
        ddl[-1]._next = None

print(' '.join([str(item.data) for item in ddl]))

### FIXED CODE ###

from collections import deque
from sys import stdin
n = int(input())
line = stdin.readlines()
ddl = deque()
for i in range(n):
    inp = line[i].split()
    if len(inp) == 2:
        op, data = inp
        data = int(data)
    else: op, data = inp[0], None
    if op == 'insert':
        ddl.appendleft(data,)
    elif op == 'delete':
        try:
            ddl.remove(data)
        except ValueError:
            pass
    elif op == 'deleteFirst':
        ddl.popleft()
    elif op == 'deleteLast':
        ddl.pop()

print(' '.join([str(item) for item in ddl]))
s = list(input())
t = list(input())

ok = False
for i in range(len(s)):
  s = s[-1] + s[:-1]
  if s == t:
    ok = True
    break
if ok:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s = list(input())
t = list(input())

ok = False
for i in range(len(s)):
  a = s[-1]
  s = s[:-1]
  s.insert(0, a)
  if s == t:
    ok = True
    break
if ok:
  print("Yes")
else:
  print("No")
r, g, b = map(int, input().split())
ans = 0
ans += r * 100 + g * 10 + b
if ans % 4 = 0:
  print("YES")
  else:
    print("NO")

### FIXED CODE ###

r, g, b = map(int, input().split())
ans = 0
ans = r * 100 + g * 10 + b
if ans % 4 == 0:
	print("YES")
else:
	print("NO")
N, L = map(int, input().split())
s = [input() for i in range(n)]
s = sorted(s)
print(*s, sep="")



### FIXED CODE ###

N,L =map(int,input().split())
s=sorted([input() for i in range(N)])
print(*s,sep="")
N, M = map(int, input().split())
def make_graph(x, y, dic):
    if x in dic.keys():
        dic[x].append(y)
    else:
        dic[x] = [y]
def dfs(p):
    if memo[p] != -1:
        return memo[p]
    if p not in dic.keys():
        return 0
    m = 0
    for d in dic[p]:
        m = max(m, dfs(d)+1)
    return m
dic = {}
for m in range(M):
    x, y = map(int, input().split())
    make_graph(x-1, y-1, dic)
inf = -1
memo = [inf]*N
ans = 0
for i in range(N):
    k= dfs(i)
    memo[i] = k
    ans = max(ans,k)
print(ans)

### FIXED CODE ###

import sys
 
sys.setrecursionlimit(100000)
 
N, M = map(int, input().split(" "))
G = [[] for _ in range(N)]
 
for _ in range(M):
    x, y = map(int, input().split(" "))
    G[x-1].append(y-1)
dp = [-1] * N
def pathlen(G, dp, v):
    if dp[v] != -1:
        return dp[v]
 
    plen = 0
    for i in G[v]:
        plen = max(plen, pathlen(G, dp, i)+1)
    dp[v] = plen
    return plen
ans = 0
for i in range(N):
    ans = max(ans, pathlen(G, dp, i))
print(ans)
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
i = 0
while True:
    if d > x:
        print(i)
        break
    d += l[i]
    i += 1


### FIXED CODE ###

n, x = map(int, input().split())
l = [0] + list(map(int, input().split()))
d = 0
i = 0
while True:
    if d > x:
        print(i - 1)
        break
    if i == n + 1:
        print(i)
        break
    i += 1
    d += l[i-1]
n = int(input())
dis = [list(map(int,input().split())) for _ in range(n)]
ans = 0
num = 0
from itertools import permutations
for path in list(permutations(range(n))):
  num += 1
  path = list(path)
  distance = 0
  for i in range(1,n):
    xi = dis[path[i-1]][0]
    xj = dis[path[i]][0]
    yi = dis[path[i-1]][1]
    xj = dis[path[i]][1]
    distance += (pow(xi-xj,2)+pow(yi-yj,2))**0.5
  ans = ans + distance
ans = ans/num
print(ans)


### FIXED CODE ###

n = int(input())
location = [list(map(int, input().split())) for _ in range(n)]

from itertools import permutations
import math
distance = []
for route in list(permutations(range(1,n+1))):
  route = list(route)

  dis = 0
  for i in range(0,n-1):
    d = math.sqrt(pow(location[route[i]-1][0]-location[route[i+1]-1][0],2) + pow(location[route[i]-1][1]-location[route[i+1]-1][1],2))
    dis = dis + d
  distance.append(dis)
  
ans = sum(distance)/len(list(permutations(range(1,n+1))))
print(ans)
n = int(input())
h = list(map(int,input().split()))

anss = []
cnt = 0
for i in range(n):
    if i == 0: continue
    if h[i] <= h[i-1]: cnt += 1
    else: anss.append(cnt); cnt = 0
    if i == n-1 : anss.append(cnt)

print(max(anss))



### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))

anss = []
cnt = 0
for i in range(n):
    if i == 0: continue
    if h[i] <= h[i-1]: cnt += 1
    else: anss.append(cnt); cnt = 0
    if i == n-1 : anss.append(cnt)

try: print(max(anss))
except: print(0)