Harryxun/stf_run huggingface dataset:
n, m = map(int, input().split())
edge = [[0] * n for _ in range(n)]
for i in range(n):
   a, b = map(int, input().split())
   edge[a-1][b-1] = 1
   edge[b-1][a-1] = 1

def dfs(now, visited):
   if (False not in visited):
      return(1)

   ans = 0
   for i in range(n):
      if (edge[now-1][i-1] == 1  and visited[i-1] == False):
         visited[i-1] = True
         ans += dfs(i, visited)
         visited[i-1] = False

   return(ans)

visited = [False] * n
visited[0] = True
print(dfs(1, visited))


### FIXED CODE ###

n, m = map(int, input().split())
g = [[] for i in range(n)]

for _ in range(m):
   a, b = map(int, input().split())
   a -= 1
   b -= 1
   g[a].append(b)
   g[b].append(a)

def dfs(v):
   if (len(v) == n):
      return 1

   ans = 0
   for u in set(g[v[-1]]) - set(v):
      ans += dfs(v + [u])

   return ans

print(dfs([0]))
#151-D:BFS
from collections import deque
#スタート地点loc=(sx,sy)を決めたときのゴールをbfsで求める
def bfs(loc):
    global tem_ans
    d=[[float('inf')]*w for i in range(h)]

    #進む方向を決める
    dx=[1,0,-1,0]
    dy=[0,1,0,-1]

    que=deque([])
    que.append(loc)
    d[loc[0]][loc[1]]=0

    #遷移していってこれ以上遷移できない状態まで埋める
    while que:
        p=que.popleft()
        for i in range(4):
            nx=p[0]+dx[i]
            ny=p[1]+dy[i]

            #遷移可能かどうか調べる
            if 0<=nx<h and 0<=ny<w and maze[nx][ny]=='.' and d[nx][ny]==float('inf'):
                #移動後の距離を保存
                d[nx][ny]=d[p[0]][p[1]]+1
                que.append([nx,ny])

                if tem_ans<d[nx][ny]:
                    tem_ans=d[nx][ny]
    return tem_ans



h,w=map(int,input().split())
maze=[list(input()) for i in range(h)]
ans=0
tem_ans=0

loc=[]
for i in range(h):
    for j in range(w):
        #通路をスタート地点に設定する
        if maze[i][j]!='#':
            loc=[i,j]

        ans=max(ans,bfs(loc))

print(ans)

### FIXED CODE ###

#151-D:BFS
from collections import deque
#スタート地点loc=(sx,sy)を決めたときのゴールをbfsで求める
def bfs(loc):
    global tem_ans
    d=[[float('inf')]*w for i in range(h)]

    #進む方向を決める
    dx=[1,0,-1,0]
    dy=[0,1,0,-1]

    que=deque([])
    que.append(loc)
    d[loc[0]][loc[1]]=0

    #遷移していってこれ以上遷移できない状態まで埋める
    while que:
        p=que.popleft()
        for i in range(4):
            nx=p[0]+dx[i]
            ny=p[1]+dy[i]

            #遷移可能かどうか調べる
            if 0<=nx<h and 0<=ny<w and maze[nx][ny]=='.' and d[nx][ny]==float('inf'):
                #移動後の距離を保存
                d[nx][ny]=d[p[0]][p[1]]+1
                que.append([nx,ny])

                if tem_ans<d[nx][ny]:
                    tem_ans=d[nx][ny]
    return tem_ans



h,w=map(int,input().split())
maze=[list(input()) for i in range(h)]
ans=0
tem_ans=0

loc=[]
for i in range(h):
    for j in range(w):
        #通路をスタート地点に設定する
        if maze[i][j]!='#':
            loc=[i,j]
        else:
            continue
        ans=max(ans,bfs(loc))

print(ans)
import bisect
import os
 
X=int(input())
hist = []
for a in range(100000):
    hist.append(a ** 5)
    i = bisect.bisect_left(hist, a ** 5 - X)
    if hist[i] == a ** 5 - X:
        print(a, i)
        break
    i = bisect.bisect_left(hist, X - a ** 5)
    if hist[i] == X - a ** 5:
        print(a, -i)
        break

### FIXED CODE ###

import math
x=int(input())
for i in range(-1000,1000):
    for j in range(-1000,1000):
        if i**5-j**5==x:
            print(i,j,sep=" ")
            exit()
def main():
    x1, y1, x2, y2 = map(int, input().split())

    ans = editorial(x1, y1, x2, y2)
    assert ans == twi(x1, y1, x2, y2)
    print(*ans)


def twi(x1, y1, x2, y2):
    """
    https://twitter.com/akensho/status/1035924165205716992
    https://twitter.com/hogeover30/status/1035903937830764545
    """
    import math
    cos90 = int(math.cos(math.pi / 2))
    sin90 = int(math.cos(math.pi / 2))

    x = x2 - x1
    y = y2 - y1
    x4 = x * cos90 - y * sin90 + x1
    y4 = x * sin90 + y * cos90 + y1

    x = x1 - x4
    y = y1 - y4
    x3 = x * cos90 - y * sin90 + x4
    y3 = x * sin90 + y * cos90 + y4

    return x3, y3, x4, y4


def editorial(x1, y1, x2, y2):
    x = x2 - x1
    y = y2 - y1

    x3 = x2 - y
    y3 = y2 + x
    x4 = x1 - y
    y4 = y1 + x

    return x3, y3, x4, y4


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    x1, y1, x2, y2 = map(int, input().split())

    ans = editorial(x1, y1, x2, y2)
    # assert ans == twi(x1, y1, x2, y2)
    print(*ans)


def twi(x1, y1, x2, y2):
    """
    https://twitter.com/akensho/status/1035924165205716992
    https://twitter.com/hogeover30/status/1035903937830764545
    """
    import math
    cos90 = int(math.cos(math.pi / 2))
    sin90 = int(math.cos(math.pi / 2))

    x = x2 - x1
    y = y2 - y1
    x4 = x * cos90 - y * sin90 + x1
    y4 = x * sin90 + y * cos90 + y1

    x = x1 - x4
    y = y1 - y4
    x3 = x * cos90 - y * sin90 + x4
    y3 = x * sin90 + y * cos90 + y4

    return x3, y3, x4, y4


def editorial(x1, y1, x2, y2):
    x = x2 - x1
    y = y2 - y1

    x3 = x2 - y
    y3 = y2 + x
    x4 = x1 - y
    y4 = y1 + x

    return x3, y3, x4, y4


if __name__ == '__main__':
    main()
S = input()
K = int(input())

itr = 0
cnt = 1
len_cnt = []
for x in S :
  if itr == 0 :
    pre = x
    itr += 1
    continue
  now = x
  if pre == now :
    cnt += 1
    itr += 1
    if itr == len(S) :
      len_cnt.append(cnt)
    continue
  if pre != now :
    len_cnt.append(cnt)
    itr+=1
    if itr == len(S) and cnt == 1 :
      len_cnt.append(cnt)
    cnt = 1
    pre = x
    continue

ans = 0
for x in len_cnt :
  if x == 1 :
    continue
  else :
    ans += int(x / 2)

if S[0] == S[-1] and len_cnt[-1] > 1 and len_cnt[-1] % 2 == 1 :
  ans += 1

print(K * ans)

### FIXED CODE ###

S = input()
K = int(input())

flag = False

itr = 0
cnt = 1
len_cnt = []
for x in S :
  if itr == 0 :
    pre = x
    itr += 1
    continue
  now = x
  if pre == now :
    cnt += 1
    itr += 1
    if itr == len(S) :
      len_cnt.append(cnt)
    continue
  if pre != now :
    len_cnt.append(cnt)
    itr+=1
    if itr == len(S) and cnt == 1 :
      len_cnt.append(cnt)
    cnt = 1
    pre = x
    continue

if sum(len_cnt) != len(S) :
  len_cnt.append(1)

if len(len_cnt) == 1 :
  print(int(len_cnt[0] * K / 2))
  exit()

ans = 0
for x in len_cnt :
  if x == 1 :
    continue
  else :
    ans += int(x / 2)

# if S[0] == S[-1] and len_cnt[-1] > 1 and len_cnt[-1] % 2 == 1 and K > 1:
#   ans += 1
if S[0] == S[-1] and len_cnt[-1] % 2 == 1 and len_cnt[0] % 2 == 1 :
  ans += 1
  flag = True

ANS = K * ans
# print (ANS, len_cnt)
if flag :
  ANS -= 1

# if S[0] ==S[-1] and len_cnt[-1] % 2 == 1 and len_cnt[-1] != 1 :
#   ANS -= 1
print(ANS)
c = raw_input()

if c == a or e or i or o or u:
  print ("vowel")
else:
  print ("consonant")


### FIXED CODE ###

c = input()

if c == "a" :
  print ("vowel")
elif c == "e" :
  print ("vowel")
elif c == "i" :
  print ("vowel")
elif c == "o" :
  print ("vowel")
elif c == "u" :
  print ("vowel")
else:
  print ("consonant")
N = Int(input())
print("Yes" if N % 9 == 0 else "No")

### FIXED CODE ###

N = int(input())
print("Yes" if N % 9 == 0 else "No")
s = input()
n = len(s)
ans = 1
# 区間は2以上の長さ
if n % 2 != 0:
    for i in range(1, n):
        a = s[n // 2]
        if s[n // 2 - 1 - i] != a or s[n // 2 + i] != a:
            print(n // 2 + i)
            exit()

else:
    for i in range(1, (n - 1) // 2 + 1):
        b = s[(n-1)//2]
        if s[(n-1)//2-i] != b or s[(n-1)//2+i] != b:
            print((n - 1) / 2 + i)
            exit()



### FIXED CODE ###

s = list(input())
n = len(s)
if n % 2 == 0:
    for i in range(n//2):
        a = s[n // 2]
        if s[n // 2 - 1 - i] != a or s[n // 2 + i] != a:
            print(n // 2 + i)
            exit()
else:
    for i in range(1, (n - 1) // 2 + 1):
        b = s[(n-1)//2]
        if s[(n - 1) // 2 - i] != b or s[(n - 1) // 2 + i] != b:
            print((n-1)//2+i)
            exit()
print(n)
S = str(input())

ans = ""

for mask in range(1 << (len(S)-1)):
    for i in range(len(S)):
        if ((mask >> i) & 1):
            ans += f"{S[i]}+"
        else:
            ans += f"{S[i]}"
    ans += "+"

print(int(eval(ans[:-1])))


### FIXED CODE ###

S = list(input())
ans = 0

for state in range(1 << len(S)-1):
    ans += eval(S[0] + ''.join(('+' if state >> i & 1 else '') + x for i, x in enumerate(S[1:])))

print(ans)
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n):
    x[a[i]-1]=i+1
print(*x)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n):
    ans[a[i]-1]=i+1
print(*ans)
a = int(input())
b = int(input())

if (a not 3) and (b not 3):
    print("3")
elif (a not 2) and (b not 2):
    print("2")
else:
    print("1")

### FIXED CODE ###

a = int(input())
b = int(input())

if (a != 3) and (b != 3):
    print("3")
elif (a != 2) and (b != 2):
    print("2")
else:
    print("1")
def snuke_the_wizard(N: int, Q: int, s: str, queries: list)->int:
    l, r = -1, N
    for t, d in reversed(queries):
        if d == 'R' and s[r-1] == t:
            r -= 1
        elif d == 'L' and s[l+1] == t:
            l += 1
    return r - l - 1 if l < r else 0


if __name__ == "__main__":
    Q = 0
    N, Q = map(int, input().split())
    s = input()
    queries = [tuple(input().split()) for _ in range(Q)]
    ans = snuke_the_wizard(N, Q, s, queries)
    print(ans)


### FIXED CODE ###

def snuke_the_wizard(N: int, Q: int, s: str, queries: list)->int:
    l, r = -1, N
    for t, d in reversed(queries):
        if d == 'R':
            if 0 <= r-1 and s[r-1] == t:
                r -= 1
            if 0 <= l and s[l] == t:
                l -= 1
        else:
            if l + 1 < N and s[l+1] == t:
                l += 1
            if r < N and s[r] == t:
                r += 1
    return r - l - 1 if l < r else 0


if __name__ == "__main__":
    Q = 0
    N, Q = map(int, input().split())
    s = input()
    queries = [tuple(input().split()) for _ in range(Q)]
    ans = snuke_the_wizard(N, Q, s, queries)
    print(ans)
a, b = [int(i) for i in raw_input().split()]
if a < b:
    print "a < b"
elif a > b:
    print "a > b":
else:
    print "a == b"

### FIXED CODE ###

a, b = [int(i) for i in raw_input().split()]

if a > b:
    print "a > b"
elif a < b:
    print "a < b"
else:
    print "a == b"
[H, A] = input().split(" ")
return int(H/A)

### FIXED CODE ###

H, A = map(int, input().split())
print(int(H/A) if H % A == 0 else int(H/A)+1)
D, G = map(int, input().split())
grid = [[0,0]]#インデックス合わせとく
for i in range(D):
    p,c = map(int, input().split())
    grid.append([p,c])

import itertools
kumi = list(itertools.product([0,1], repeat=D))
anls = []
fans = float('inf')
for item in kumi:
    count = 0
    ans = 0
    k = 0
    score = 0
    for i in item:
        count += 1
        if i == 1:
            score += grid[count][0]*100*count + grid[count][1]
            ans += grid[count][0]
        else:
            k = count

    if G <= score :
        fans = min(fans,ans)
    elif score+(k*100)*(grid[k][0]-1) >= G :
        a = int((G-score)/(k*100))
        if score+a*k*100=G:
            ans += a
        else:
            ans += (a+1)
        fans = min(fans,ans)
if fans != float('inf'):
    fans = int(fans)
print(fans)

### FIXED CODE ###

D, G = map(int, input().split())
grid = [[0,0]]#インデックス合わせとく
for i in range(D):
    p,c = map(int, input().split())
    grid.append([p,c])

import itertools
kumi = list(itertools.product([0,1], repeat=D))
anls = []
fans = float('inf')
for item in kumi:
    count = 0
    ans = 0
    k = 0
    score = 0
    for i in item:
        count += 1
        if i == 1:
            score += grid[count][0]*100*count + grid[count][1]
            ans += grid[count][0]
        else:
            k = count

    if G <= score :
        fans = min(fans,ans)
    elif score+(k*100)*(grid[k][0]-1) >= G :
        a = int((G-score)/(k*100))
        if score+a*k*100==G:
            ans += a
        else:
            ans += (a+1)
        fans = min(fans,ans)
if fans != float('inf'):
    fans = int(fans)
print(fans)
n = int(input())
eigo = 'abcdefghijklmnopqrstuvwxyz'

keta = 1
while n > 26**keta:
    n -= 26**keta
    keta += 1

ans =''
for i in range(keta):
    a =n // 26**(keta-1-i)
    ans += eigo[a]
    n = n % (26**(keta-1-i))

print(ans)

### FIXED CODE ###

n = int(input())
eigo = 'abcdefghijklmnopqrstuvwxyz'

keta = 1
j = 1
while n > 26**j:
    n -= 26**j
    keta += 1
    j += 1

n = n-1
ans =''

while keta != 0:
    a = n //(26**(keta-1))
    if a != 0:
        n = n -(26**(keta-1)*a)
        ans += eigo[a]
    else:
        ans+= eigo[0]
    keta -= 1

print(ans)
n = int(input())

print(1 if x == 0 else 0)



### FIXED CODE ###

n = int(input())
print(1 if n == 0 else 0)
import math

def divisors(n):
    divs = set()
    for i in range(1,int(n**0.5)+1):
        if n % i == 0:
            divs |= {i, n//i}
    return sorted(divs)

def is_disjoint(n,m):
    return math.gcd(n,m) == 1

def appendable(list, n):
    return all(is_disjoint(l, n) for l in list)

#O(n**2)!
def filter_disjoint(divisors):
    list = []
    for d in divisors:
        if appendable(list, d):
            list.append(d) 
    return list


a,b = list(map(int, input().split()))

filterd = filter_disjoint(divisors(math.gcd(a,b)))
print(len(filterd))

### FIXED CODE ###

def divisors(n):
    divs = set()
    for i in range(1,int(n**0.5)+1):
        if n % i == 0:
            divs |= {i, n//i}
    return sorted(divs)

def gcd(n,m):
    if m == 0:
        return n
    else:
        return gcd(m, n%m)

def is_disjoint(n,m):
    return gcd(n,m) == 1

def appendable(list, n):
    return all(is_disjoint(l, n) for l in list)

#O(n**2)!
def filter_disjoint(divisors):
    list = []
    for d in divisors:
        if appendable(list, d):
            list.append(d) 
    return list


a,b = list(map(int, input().split()))

filterd = filter_disjoint(divisors(gcd(a,b)))
print(len(filterd))
n,k = map(int,input().split())
a = [int(i) - 1 for i in input().split()]
r = []
nx = 0
for i in range(n):
    r.append(nx)
    if a[nx] in r:
        m = r.index(a[nx])
        d = i - m
        k = k - m
        k = k % d
        print(r[k + 1] + 1)
        break
    nx = a[nx]
    
    




### FIXED CODE ###

n,k = map(int,input().split())
a = [int(i) - 1 for i in input().split()]
r = []
nx = 0
sr = set([])
for i in range(n):
    r.append(nx)
    sr.add(nx)
    if k < i:
        print(r[k] + 1)
        break
    tnx = a[nx]
    if tnx in sr:
        m = r.index(a[nx])
        d = i - m + 1
        k = k - m
        k = k % d
        print(r[k + m] + 1)
        break  
    nx = tnx
a=int(input())

print('A' if(a.isupper) else 'a')

### FIXED CODE ###

a=input()

print('A' if a.isupper() else 'a')
N = int(input())
A = [input() for _ in range(N)]
for j in range(N):
    if max(A) == A[i]:
        A.remove(A[i])
        print(max(A))
        A.insert(i,A[i])
    else:
        print(max(A))

### FIXED CODE ###

N = int(input())
A = [int(input()) for _ in range(N)]
if N == 2:
    for j in A[::-1]:
        print(j)
else:
    tmp = sorted(A)
    del tmp[0:(N-2)]
    for i in range(N):
        if A[i] == tmp[1]:
            print(tmp[0])
        else:
            print(tmp[1])
#!/usr/bin/env python3

n, m = map(int, input().split())
a = [-1 for _ in range(n)]
b = [-1 for _ in range(n)]
d = {}
for i in range(n):
    a[i], b[i] = map(int, input().split())
    if a[i] not in d:
        d[a[i]] = b[i]
    else:
        d[a[i]] += b[i]

d = sorted(d.items(), key=lambda x:x[0])
num = ans = 0 
for i in range(n):
    tmp = num 
    num += d[i][1]
    if num <= m:
        ans += d[i][0]*d[i][1]
    else:
        ans += d[i][0]*(m-tmp)
        break

print(ans)


### FIXED CODE ###

#!/usr/bin/env python3

n, m = map(int, input().split())
a = [-1 for _ in range(n)]
b = [-1 for _ in range(n)]
d = {}
for i in range(n):
    a[i], b[i] = map(int, input().split())
    if a[i] not in d:
        d[a[i]] = b[i]
    else:
        d[a[i]] += b[i]

d = sorted(d.items(), key=lambda x:x[0])
num = ans = 0 
for i in range(len(d)):
    tmp = num 
    num += d[i][1]
    if num <= m:
        ans += d[i][0]*d[i][1]
    else:
        ans += d[i][0]*(m-tmp)
        break

print(ans)
dish_time = [int(input()) for i in range(5)]
rest=[0,0,0,0,0]
last_min=[]

for j in range(5):
    rest[j] = dish_time[j] - (dish_time[j]//10*10)
    if rest[j] != 0:
        dish_time[j] = (dish_time[j]//10 + 1 ) *10   
        last_min.append(rest[j])

sum_time =  0

for i in range(5):
    sum_time = sum_time + dish_time[i]

sum_time = sum_time + min(last_min) - 10
    
print(sum_time)

### FIXED CODE ###

dish_time = [int(input()) for i in range(5)]
rest=[0,0,0,0,0]
last_min=[]

for j in range(5):
    rest[j] = dish_time[j] - (dish_time[j]//10*10)
    if rest[j] != 0:
        dish_time[j] = (dish_time[j]//10 + 1 ) *10   
        last_min.append(rest[j])

sum_time =  0

for i in range(5):
    sum_time = sum_time + dish_time[i]

if len(last_min) != 0:
    sum_time = sum_time + min(last_min) - 10
    print(sum_time)
else :
    sum_time = sum_time
    print(sum_time)
l = sorted(list(map, input().split()))
print("Yes" if l[0] + l[1] == l[2] else "No")

### FIXED CODE ###

l = sorted(map(int, input().split()))
print("Yes" if l[0] + l[1] == l[2] else "No")
S, T = [str(i) for i in input().split()]
 
s = len(S)
t = len(T)
n = s - t + 1
min = t
 
for a in range(n):
  count = 0 
	for b in range(t):
      if S[a+b] != T[b]:
        count += 1
  if count < min:
    min = count
      
print(min)

### FIXED CODE ###

x = [input() for i in range(2)]
S = x[0]
T = x[1]
moji = len(T)

for a in range(len(S) - len(T) + 1):
  count = 0
  for b in range(len(T)):
    
    if S[a+b] != T[b]:
      count += 1
  if count < moji:
    moji = count

print(moji)
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


def MI(): return map(int, input().split())


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YNL = {False: 'No', True: 'Yes'}
YNU = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False
# show_flg = True


def base_10_to_n(X, n):
    if int(X / n):
        return base_10_to_n(int(X/n), n) + str(X % n)
    return str(X % n)


def main():
    A = I()

    for i in range(10, 10000+1):
        print(i, base_10_to_n(A, i))
        if str(i) == base_10_to_n(A, i):
            print(i)
            return

    print(-1)


if __name__ == '__main__':
    main()


### FIXED CODE ###

from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


def MI(): return map(int, input().split())


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YNL = {False: 'No', True: 'Yes'}
YNU = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False
# show_flg = True


def main():
    s = S()
    d = deque(s)
    ans = 0

    # print(d)

    while len(d) > 1:
        if d[0] == d[-1]:
            d.popleft()
            d.pop()
        elif d[0] == 'x':
            d.append('x')
            ans += 1
        elif d[-1] == 'x':
            d.appendleft('x')
            ans += 1
        else:
            print(-1)
            return

    print(ans)


if __name__ == '__main__':
    main()
while True:
  h,w=map(int,input().split())
  if h==0 & w==0:
    break
  for i in range(h):
    for i in range(w):
      if (i+j)%2==0:
        print("#", end ="")
      else:
        print(".", end="")
    print("")
  print()


### FIXED CODE ###

while True:
  h,w=map(int,input().split())
  if h==0 & w==0:
    break
  for i in range(h):
    print(("#."* w)[i%2:][:w])
  print()
N=int(input())

H=list(input().split())

count_list=[]
for i in range(N-1):
  count=0
  a=i
  while H[a]>=H[a+1]:
    count+=1
    a+=1
    if a==N-1:
      break
  count_list.append(count)
print(max(count_list))

### FIXED CODE ###

N=int(input())

H=list(map(int,input().split()))
A=[0 for i in range(N)]
if N==1:
  print(0)
else:
  if H[0]>=H[1]:
  	A[0]+=1
  if N>=3:
    for i in range(1,N-1):
      if H[i]>=H[i+1]:
        A[i]+=A[i-1]+1
  print(max(A))
import math
import collections
n=int(input())
a=list(map(int,input().split()))
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
for i in a:
    c=collections.Counter(a)
    ans=0
    c[i] -=1
    for k in c.values():
        if k != 1:
            ans +=combinations_count(k,2)
    print(ans)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
ans=0
b=[0]*(n+1)
for i in range(n):
    b[a[i]]+=1
for k in b:
    ans+=k*(k-1)//2
for i in range(n):
    print(ans-b[a[i]]+1)
# coding: utf-8
import numpy as np

hairetsu = input().split(' ')
sunuke = int(hairetsu[0])
okashi = int(hairetsu[1])
books = [[0]*sunuke]*okashi

for i in range(0, okashi):
  kaisu = int(input())
  whohas = list(map(int, input().split(' ')))
  for j in range(0, kaisu):
    k = int(whohas[j])-1
    books[i][k] = 1


result = np.sum(books,axis=0)
a = np.count_nonzero(result)
print(sunuke - a)

### FIXED CODE ###

# coding: utf-8
import numpy as np

hairetsu = input().split(' ')
sunuke = int(hairetsu[0])
okashi = int(hairetsu[1])
books = [[0]*sunuke]*okashi

for i in range(0, okashi):
  kaisu = int(input())
  whohas = list(map(int, input().split(' ')))
  for j in range(0, kaisu):
    k = int(whohas[j])-1
    books[i][k] = 1


result = np.sum(books,axis=0)
a = np.count_nonzero(result)
print(sunuke - a)
N = int(input())
S = list(input())
i = 0
count = 0
while i < N:
    while S[i] == S[i-1]:
      i += 1
    count +=1
    i +=1
print(count)

### FIXED CODE ###

N = int(input())
S = list(input())
i = 0
count = 0
while i < N-1:
    while S[i] == S[i+1]:
      i += 1
      if i == N-1:
        break
    if i == N-1:
      break
    count +=1
    i +=1
count +=1
print(count)
n = int(input())
a = map(int, input().split())

mn = 10 ** 9
mx = 0

for i in range(n):
  if a[i] < mn:
    mn = a[i]
    
  if a[i] > mx:
    mx = a[i]

print(mx - mn)

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
 
mn = 10 ** 9
mx = 0
 
for i in range(n):
  if a[i] < mn:
    mn = a[i]
    
  if a[i] > mx:
    mx = a[i]
  
print(mx - mn)
a,b,c=input().split()
print "YES" if a[-1] == b[0] && b[-1] == c[0] else "NO"

### FIXED CODE ###

a,b,c=input().split()
print("YES" if a[-1] == b[0] and b[-1] == c[0] else "NO")
import math
A,B,C,D = map(int,input().split())

count = 0
len = B-A+1

count += math.floor(B/C)
count -= math.floor((A-1)/C)
count += math.floor(B/D)
count -= math.floor((A-1)/D)

lcm = C*D / math.gcd(C,D)
count -= math.floor(B/lcm)
count += math.floor((A-1)/lcm)

print(len - count)


### FIXED CODE ###

import math
def gcd(a, b):
    if b==0:
        return a
    return gcd(b, a%b)

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

count = 0
lcm = C*D // gcd(C,D)


print(B - B//C - B//D + B//lcm - (A - 1 - (A-1)//C - (A-1)//D + (A-1)//lcm))