Harryxun/stf_run huggingface dataset:
import sys
X,N = map(int,input().split())

if N == 0:
  print(X)
  sys.exit()

P = list(map(int,input().split()))

if X not in P:
  print(X)
else:
  for i in range(X-1,min(P)-2,-1):
    if i not in P:
      a = abs(X - i)
      break
  for j in range(X+1,max(P)+2):
    if j not in P:
      b = abs(j - X)
      break
      
if a <= b:
  print(i)
else:
  print(j)

### FIXED CODE ###

X,N = map(int,input().split())
P = list(map(int,input().split()))

if N == 0:
  print(X)
else:
  for i in range(X,-2,-1):
    if i not in P:
      a = abs(X - i)
      break
  for j in range(X+1,102):
    if j not in P:
      b = abs(j - X)
      break
  if a <= b:
    print(i)
  else:
    print(j)
C:\Users\kouya\Anaconda3\python.exe C:/Users/kouya/pywork/atcoder/past/Contest170.py
2 100
No

Process finished with exit code 0


### FIXED CODE ###

import sys

def main():
    X,Y=map(int,input().split())
    crane=(Y-2*X)/2
    if crane!=int(crane):
        print("No")
        sys.exit()
    turtle=X-crane
    if crane>=0 and turtle>=0:
        print("Yes")
    else:
        print("No")

if __name__=="__main__":
    main()
#A
"""
s = input().split("/")
if s[1] == "04" and s[2] == "30":
    print("Heisei")
else:
    print("TBD")
"""

#B
n = int(input())
ans = 0
for i in range(n):
    a = input().split()
    if a[1] == "JPY":
        ans += int(a[0])
    else:
        ans += int(a[0]) * 380000
print(ans)

### FIXED CODE ###

#A

"""
s = input().split("/")
if int(s[1]) <= 4:
    print("Heisei")
else:
    print("TBD")

#B
"""
n = int(input())
ans = 0
for i in range(n):
    a = input().split()
    if a[1] == "JPY":
        ans += int(a[0])
    else:
        ans +=  float(a[0]) * 380000
print(ans)
def main():
    N, M = map(int, input().split())
    H_list = [int(_) for _ in input().split()]

    # iso_list = []
    index_list = []
    for m in range(M):
        A, B = map(int, input().split())
        if H_list[A-1] > H_list[B-1]:
            index_list.append(B-1)
        elif H_list[A-1] < H_list[B-1]:
            index_list.append(A-1)
    
        # iso_list.append(A)
        # iso_list.append(B)        

    index_list = list(set(index_list))
    for i in index_list:
        del H_list[i]        

    # iso_list = list(set(iso_list))
    # iso_list = len(H_list - iso_list)
    
    # out = iso_list + 
    out = len(H_list)
    print(out)
main()

### FIXED CODE ###

N, M = map(int, input().split())
H = [0] + list(map(int, input().split()))
O = [0] + [1] * N
for _ in range(M):
    A, B = map(int, input().split())
    if H[A] <= H[B]:
        O[A] = 0
    if H[A] >= H[B]:
        O[B] = 0
print(sum(O))
def main():
    import math
    a, b, n = map(int, input().split())
    ans = 0
    
    if n > 10 ** 5:
        for x in range(n, math.sqrt(n), -1):
            fx = math.floor(a * x / b) - math.floor(x / b) * a
            #print(fx)
            if ans < fx:
                ans = fx
            if ans > fx + 10 ** 3:
                #exit()
                pass
    else: 
        for x in range(n, 0, -1):
            fx = math.floor(a * x / b) - math.floor(x / b) * a
            #print(fx)
            if ans < fx:
                ans = fx
            if ans > fx + 10 ** 3:
                #exit()
                pass

    print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###


def main():
    import math
    a, b, n = map(int, input().split())
    if n >= b:
        ans = math.floor(a * (b-1)/b)
    else:
        ans = math.floor(a * n / b)
    
    print(ans)
    




if __name__ == "__main__":
    main()
n = int(input())
a, b, c = [], [], []
for i in range(n):
    ab = list(map(int, input().split()))
    a.append(ab[0])
    b.append(ab[1])
    if(ab[0] > ab[1]):
        c.append(ab[1])
if(len(c) == 0):
    print(0)
else:
    sort.c()
    print(sum(a) - c[0])

### FIXED CODE ###

n = int(input())
a, b, c = [], [], []
for i in range(n):
    ab = list(map(int, input().split()))
    a.append(ab[0])
    b.append(ab[1])
    if(ab[0] > ab[1]):
        c.append(ab[1])
if(len(c) == 0):
    print(0)
else:
    print(sum(a) - min(c))
package main

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

// An Item is something we manage in a priority queue.
type Item struct {
	value    []int
	priority int64
	// The index is needed by update and is maintained by the heap.Interface methods.
	index int // The index of the item in the heap.
}

// A PriorityQueue implements heap.Interface and holds Items.
type PriorityQueue []*Item

func (pq PriorityQueue) Len() int { return len(pq) }

func (pq PriorityQueue) Less(i, j int) bool {
	//We want Pop to give us the highest, not lowest, priority so we use greater than here.
	return pq[i].priority > pq[j].priority
}

func (pq PriorityQueue) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
	pq[i].index = i
	pq[j].index = j
}

func (pq *PriorityQueue) Push(x interface{}) {
	n := len(*pq)
	item := x.(*Item)
	item.index = n
	*pq = append(*pq, item)
}

func (pq *PriorityQueue) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	item.index = -1 // for safety
	*pq = old[0 : n-1]
	return item
}

func Equal(a, b []int) bool {
	if len(a) != len(b) {
		return false
	}
	for i, v := range a {
		if v != b[i] {
			return false
		}
	}
	return true
}

type IntArray []int64

func (a IntArray) Len() int {
	return len(a)
}

func (a IntArray) Less(i, j int) bool {
	return a[i] > a[j]
}

func (a IntArray) Swap(i, j int) {
	a[i], a[j] = a[j], a[i]
}

var sc = bufio.NewScanner(os.Stdin)

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

func exists(pq PriorityQueue, item *Item) bool {
	for i := 0; i < pq.Len(); i++ {
		if pq[i].priority == item.priority && Equal(pq[i].value, item.value) {
			return true
		}
	}
	return false
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func main() {
	line1 := nextLine()
	NK := strings.Split(line1, " ")
	N, _ := strconv.Atoi(NK[0])
	K, _ := strconv.Atoi(NK[1])
	S := nextLine()
	l := make([]int, 0)
	if string(S[0]) == "0" {
		l = append(l, 0)
	}
	for i := 0; i < N; i++ {
		j := i
		for j < N && S[j] == S[i] {
			j++
		}
		l = append(l, j-i)
		i = j
	}
	if string(S[N-1]) == "0" {
		l = append(l, 0)
	}

	sums := make([]int, len(l)+1)
	for i := 0; i < len(l); i++ {
		sums[i+1] = sums[i] + l[i]
	}

	ans := 0
	for left := 0; left < len(sums); left += 2 {
		right := left + 2*K + 1
		if right >= len(sums) {
			right = len(sums) - 1
		}
		ans = max(ans, sums[right]-sums[left])
	}
	fmt.Println(ans)
}


### FIXED CODE ###

from itertools import accumulate
N, K = map(int, input().split())
S = input()
nums = []
if S[0] == '0':
    nums.append(0)
i = 0
while i < N:
    j = i
    while j < N and S[i] == S[j]:
        j += 1
    nums.append(j - i)
    i = j
if S[-1] == '0':
    nums.append(0)

sums = [0] * (len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
ans = 0
left = 0
while left < len(nums):
    right = left + 2 * K + 1
    if right > len(sums):
        right = len(sums) - 1
    ans = max(ans, sums[right]-sums[left])
    left += 2

print(ans)
from collections import Counter
from sys import exit

n = input()
v_array = list(map(int,input().split()))
 
v_odd = v_array[0::2]
v_even = v_array[1::2]
 
v_odd_common = Counter(v_odd).most_common()
v_even_common = Counter(v_even).most_common()

if len(set(v_array)) == 1:
    print(int(len(v_array)/2))
    exit()

print(v_odd_common, v_even_common)
for i in range(0,min(len(v_odd_common),len(v_even_common))):
    if v_odd_common[i] == v_even_common[i]:
        if v_odd_common[i+1][1] > v_even_common[i+1][1]:
            v_odd_common_candidate = v_odd_common[i][1]
            v_even_common_candidate = v_even_common[i+1][i]
            break
        elif v_odd_common[i+1][1] < v_even_common[i+1][1]:
            v_odd_common_candidate = v_odd_common[i+1][1]
            v_even_common_candidate = v_even_common[i][i]
            break
        else:
            v_odd_common_candidate = v_odd_common[i][1]
            v_even_common_candidate = v_even_common[i][i]
            break
    else:
        v_odd_common_candidate = v_odd_common[0][1]
        v_even_common_candidate = v_even_common[0][1]
    
print(len(v_odd) - v_odd_common_candidate + len(v_even) - v_even_common_candidate)

### FIXED CODE ###

from collections import Counter
 
n = int(input())
v_array = list(map(int,input().split()))
 
v_odd = v_array[0::2]
v_even = v_array[1::2]
 
v_odd_common = Counter(v_odd).most_common()
v_even_common = Counter(v_even).most_common()

v_odd_common.append((0,0))
v_even_common.append((0,0))

if v_odd_common[0] != v_even_common[0]:
    print(n-v_odd_common[0][1]-v_even_common[0][1])
else:
    print(min(n-v_odd_common[0][1]-v_even_common[1][1],n-v_odd_common[1][1]-v_even_common[0][1]))
def main():  
  import sys
  input = sys.stdin.readline
  n = int(input())
  s = input()
  ans = set()
  for i in range(len(s)-2):
    for j in range(i+1,len(s)-1):
      for l in range(j+1,len(s)):
        ans.add(int(s[i])*100+int(s[j])*10+int(s[l]))
  print(len(ans))
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
input = sys.stdin.readline
n = int(input())
s = input()
def multi_index(l,x):
  return tuple([i for i,_x in enumerate(l) if _x == x])

ans = 0
for i in range(10):
  e = 0
  if str(i) in s:
    c = multi_index(s,str(i))[0]
    for j in range(10):
      if str(j) in s and i!=j and c<=len(s)-2:
        for q in range(c+1,len(s)-1):
          if str(j) == s[q]:
            d = q
            break
        else:
          d = -1
      elif str(j) in s and i==j and len(multi_index(s,str(i)))>=2:
        d = multi_index(s,str(i))[1]
      else:
        d = -1
      if d > c:
        for l in range(10):
          if str(l) in s and i!=j and j!=l and i!=l:
            e = multi_index(s,str(l))[-1]
            if e > d:
              ans += 1
          if str(l) in s and i!=j and j==l:
            e = multi_index(s,str(l))[-1]
            if e > d:
              ans += 1
          if str(l) in s and i==j and j!=l:
            e = multi_index(s,str(l))[-1]
            if e > d:
              ans += 1
          if str(l) in s and i==j and j==l:
            e = multi_index(s,str(l))[-1]
            if e > d:
              ans += 1
          if str(l) in s and i==l and j!=l:
            e = multi_index(s,str(l))[-1]
            if e > d:
              ans += 1
print(ans)
N,M,X=map(int,input().split())
A=list(map(int,input().split()))
left = [A[i] for i in range(N+1) if A[i] < X ]
right = [A[i] for i in range(N+1) if A[i] > X]
print(min(len(left),len(right)))

### FIXED CODE ###

N,M,X=map(int,input().split())
A=list(map(int,input().split()))
left = [A[i] for i in range(M) if A[i] < X ]
right = [A[i] for i in range(M) if A[i] > X]
print(min(len(left),len(right)))
a,p=int(input().split())
c=a*3
b=(c+p)//2
print(b)


### FIXED CODE ###

a,p=map(int,input().split())
c=a*3
b=(c+p)//2
print(b)
N = int(input())
X = list(map(int, input().split()))
Y = [[X[k],k] for k in range(N)]
Y.sort()
A = [0 for k in range(N)]

for k in range(N):
    if k >= N//2:
        A[Y[k][1]] = Y[N//2-1][0]
    else:
        A[Y[k][1]] = Y[N//2][0]

for x in A:
    print(A)

### FIXED CODE ###

N = int(input())
X = list(map(int, input().split()))
Y = [[X[k],k] for k in range(N)]
Y.sort()
A = [0 for k in range(N)]

for k in range(N):
    if k >= N//2:
        A[Y[k][1]] = Y[N//2-1][0]
    else:
        A[Y[k][1]] = Y[N//2][0]

for x in A:
    print(x)
li = [int(i) for i in input().split()]

for i in li:
    if i%2 == 0:
        print(0)
        exit()

li.pop(max(li))
ans = 1
for i in li:
    ans *= i

print(ans)


### FIXED CODE ###

li = [int(i) for i in input().split()]

for i in li:
    if i%2 == 0:
        print(0)
        exit()

li.remove(max(li))
ans = 1
for i in li:
    ans *= i

print(ans)
counter = 1
while True:
    x = int(input())
    if x == 0
        break
    else :
        print("Case {}:{} ".format(counter,x))
        counter = counter + 1
        


### FIXED CODE ###

ans = []
for i, x in enumerate(open(0).readlines()):
    ans.append("Case %d: %s" % (i+1, x))
open(1,'w').writelines(ans[:-1])
from itertools import product

def add_magic_move(enable_to_move_list):
  ret = list(enable_to_move_list)
  for h, w in enable_to_move_list:
    for target_h, target_w in product([h-1, h, h+1], [w-1, w, w+1]):
      if -1 < target_h < H and -1 < target_w < W and (target_h, target_w) not in enable_to_move_list:
        s[target_h][target_w] = '.'
        ret += [(target_h, target_w)]
  return ret
    

def get_enable_to_move_list(h, w, enable_to_move_list):
  if (h, w) in enable_to_move_list:
    return enable_to_move_list
  enable_to_move_list += [(h, w)]
  targets = ((h+1, w), (h-1, w), (h, w+1), (h, w-1))
  for h, w in targets:
    if -1 < h < H and -1 < w < W and s[h][w] == '.':
      enable_to_move_list = get_enable_to_move_list(h, w, enable_to_move_list)
  return enable_to_move_list

H, W = map(int, input().split())
s_h, s_w = [i-1 for i in map(int, input().split())]
d_h, d_w = [i-1 for i in map(int, input().split())]
s = [list(input()) for i in range(H)]

enable_to_move_list = get_enable_to_move_list(s_h, s_w, [])
i = 0
while True:
  if (d_h, d_w) in enable_to_move_list:
    break
  tmp = add_magic_move(enable_to_move_list)
  i += 1
  for h, w in list(set(tmp) - set(enable_to_move_list)):
  	enable_to_move_list = get_enable_to_move_list(h, w, enable_to_move_list)
  if not set(tmp) ^ set(enable_to_move_list):
    i = -1
    break

print(i)

### FIXED CODE ###

N, X, T = map(int, input().split())
t = int(N / X) if N % X == 0 else int(N // X + 1)
print(f'{t * T}')
N = int(input())
used = [input()]
flag = 1
for i in range(N-1):
  now = input()
  if now not in used and used[-1][-1] == now[0]:
    used.append(now)
  else:
    flag = 0
   	break
if flag == 1:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N = int(input())
used = [input()]
flag = 1
for i in range(N-1):
  now = input()
  if now not in used and used[-1][-1] == now[0]:
    used.append(now)
  else:
      flag = 0

if flag == 1:
  print("Yes")
else:
  print("No")
l,r = map(int,input().split(" "))

if r-l > 2019:
    print(0)
else:
    ret = 2020
    for i in range(l,r+1,1):
        for j in range(l,r+1,1):
            if i == j:
                continue
            ret = min(ret,(i*j)%2019)
print(ret)


### FIXED CODE ###

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

if r-l > 2019:
    print(0)
else:
    ret = 2020
    for i in itertools.combinations(range(l,r+1,1),2):
        ret = min(ret,(i[0]*i[1])%2019)
    print(ret)
def main():
    from collections import deque
    from decimal import Decimal, getcontext

    getcontext().prec = 1000

    N = int(input())

    # {1,...,N}*2を分割
    # k個の集合があって
    # 各集合は他のk-1個の集合に対し共通要素を1個ずつ合わせてk-1個の要素をもつ

    sq = Decimal(N * 8 + 1).sqrt()
    cond = sq % 2 == 1  # 奇数か

    if not cond:
        print('No')
        return
    k = int((1 + sq) // 2)  # Decimalのままだとrangeの引数に使えない
    print('Yes')
    print(k)

    deqs = []
    it = iter(range(1, N + 1))
    for _ in range(k):
        print(k - 1, end=' ')
        t = []
        for deq in deqs:
            x = deq.popleft()
            t.append(x)
        u = []
        for _ in range(k - 1 - len(t)):
            x = next(it)
            u.append(x)
        print(*t, *u)
        deqs.append(deque(u))


if __name__ == '__main__':
    main()


### FIXED CODE ###

n = int(input())

k = int((n * 2) ** 0.5) + 1
if k * (k - 1) != 2 * n:
    print('No')
else:
    print('Yes')
    print(k)
    arr = [list() for _ in range(k)]

    num = 1
    tar1, tar2 = 0, 1
    while True:
        arr[tar1].append(num)
        arr[tar2].append(num)
        if num == n:
            break
        else:
            num += 1
        if len(arr[tar1]) == k - 1:
            tar1 += 1
            tar2 = tar1 + 1
        else:
            tar2 += 1
    for i in range(k):
        print(k - 1, *arr[i])
from bisect import*
from collections import*
n,k,*a=map(int,open(0).read().split())
b=defaultdict(list)
for i,v in enumerate(a):b[v]+=i,
s=a[0]
i=c=0
while 1:
  t=b[s]
  m=len(t)
  j=bisect(t,i)
  c+=j==m
  i=t[j%m]+1
  if i==n:break
  s=a[i]
k%=c+1
"""
s=[]
for i in a*k:
  if i in s:s=s[:s.index(i)]
  else:s+=i,
print(*s)
"""
a*k

### FIXED CODE ###

from bisect import*
from collections import*
n,k,*a=map(int,open(0).read().split())
b=defaultdict(list)
for i,v in enumerate(a):b[v]+=i,
s=a[0]
i=c=0
while 1:
  t=b[s]
  m=len(t)
  j=bisect(t,i)
  c+=j==m
  i=t[j%m]+1
  if i==n:break
  s=a[i]
k%=c+1
s=a[0]
i=c=0
while c<k-1:
  t=b[s]
  m=len(t)
  j=bisect(t,i)
  c+=j==m
  i=t[j%m]+1
  s=a[i]
r=[]
while 1:
  t=b[s]
  m=len(t)
  j=bisect(t,i)
  if j==m:
    r+=s,
    i+=1
  else:
    i=t[j]+1
  if i==n:
    break
  s=a[i]
print(*r)
N, K = map(int, input().split())
A = list(map(int, input().split()))

vis = set()
vis.add(1)
cnt = 0
cnt2town = {}
town2cnt = {}
cnt2town[0] = 1
town2cnt[1] = 0

for a in A:
    if a in vis:
        c = town2cnt[a]
        rem = K - cnt
        num_loop = cnt - c

        k = rem % num_loop
        print(cnt2town[c + k + 1])
        exit()

    if cnt == K:
        print(a)
        exit()

    cnt += 1
    cnt2town[cnt] = a
    town2cnt[a] = cnt
    vis.add(a)


### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))

vis = set()
vis.add(1)
cnt = 0
cnt2town = {}
town2cnt = {}
cnt2town[0] = 1
town2cnt[1] = 0

cnt = 1
prev = 1
while cnt <= K:
    a = A[prev - 1]

    if a in vis:
        c = town2cnt[a]

        rem = K - cnt
        num_loop = cnt - c

        r = rem % num_loop
        print(cnt2town[c + r])

        exit()

    cnt2town[cnt] = a
    town2cnt[a] = cnt
    vis.add(a)

    prev = a
    cnt += 1


print(a)
N = int(input())
sum=0
import math
for i in range(N):
  for j in range(N):
       t=gcd(i+1,j+1)
       for k in range(N):
          sum =sum + gcd(t, k+1)
print(sum)


### FIXED CODE ###

N = int(input())
sum=0
import math
for i in range(N):
  for j in range(N):
       t=math.gcd(i+1,j+1)
       for k in range(N):
          sum =sum + math.gcd(t, k+1)
print(sum)
# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

N, M = map(int, raw_input().split())
ab = [map(int, raw_input().split()) for i in xrange(N)]
cd = [map(int, raw_input().split()) for i in xrange(N)]

for i, (a, b) in enumerate(ab):
    mn = 1e10
    p = -1
    for j, (c, d) in enumerate(cd, 1):
        tmp = abs(a - c) + abs(c - d)
        if tmp < mn:
            mn = tmp
            p = j
    print p


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

N, M = map(int, raw_input().split())
ab = [map(int, raw_input().split()) for i in xrange(N)]
cd = [map(int, raw_input().split()) for i in xrange(M)]

for i, (a, b) in enumerate(ab):
    mn = 1e10
    p = -1
    for j, (c, d) in enumerate(cd, 1):
        tmp = abs(a - c) + abs(b - d)
        if tmp < mn:
            mn = tmp
            p = j
    print p
import itertools
n = [int(i) for i in input().split()]
if n[0] == 1 and n[1] < n[2]:
    print(0)
elif n[1]>n[2]:
    print(0)
elif n[0] == 1 and n[1]==n[2]:
    print(1)
else:
    m = range(n[1],n[2]+1)
    l = n[0]-2
    c = list(itertools.combinations(m,l))
    c.extend([(i,i) for i in m])
    print(len(set([i+j for i,j in c])))

### FIXED CODE ###

n = [int(i) for i in input().split()]
if n[0] == 1 and n[1] < n[2]:
    print(0)
elif n[1]>n[2]:
    print(0)
elif n[0] == 1 and n[1]==n[2]:
    print(1)
else:
    mi = n[1]*(n[0]-1)+n[2]
    ma = n[2]*(n[0]-1)+n[1]
    print(ma-mi+1)
def func():
    S = input()
    K = int(input())

    ans = 0
    if S[0] == '1':
        ans = S[1]
    else:
        ans = S[0]

    print(ans)


if __name__ == '__main__':
    func()


### FIXED CODE ###

def func():
    S = input()
    K = int(input())

    Slen = len(S)

    ans = 1
    for i in range(K):
        if i == Slen:
            break

        if S[i] != "1":
            ans = S[i]
            break

    print(ans)


if __name__ == '__main__':
    func()
S = []
H = []
C = []
D = []

n = int(input())
for i in range(n):
    mark, num = [x for x in input().split()]
    if mark == 'S':
        S.append(int(num))

    elif mark == 'H':
        H.append(int(num))

    elif mark == "C":
        C.append(int(num))

    else: #D
        D.append(int(num))


for i in range(1,14):
    if not i in S:
        print("S", i)
for i in range(1,14):
    if not i in H:
        print("H", i)for i in range(1,14):
for i in range(1,14):
    if not i in C:
        print("C", i)for i in range(1,14):
for i in range(1,14):
    if not i in D:
        print("D", i)

### FIXED CODE ###

S = []
H = []
C = []
D = []

n = int(input())
for i in range(n):
    mark, num = [x for x in input().split()]
    if mark == 'S':
        S.append(int(num))

    elif mark == 'H':
        H.append(int(num))

    elif mark == "C":
        C.append(int(num))

    else: #D
        D.append(int(num))


for i in range(1,14):
    if not i in S:
        print("S", i)
for i in range(1,14):
    if not i in H:
        print("H", i)
for i in range(1,14):
    if not i in C:
        print("C", i)
for i in range(1,14):
    if not i in D:
        print("D", i)
i = 0
while:
  i += 1

### FIXED CODE ###

def wf(this_graf):
    s = len(graf)
    for k in range(s):
        for i in range(s):
            for j in range(s):
                this_graf[i][j] = min(this_graf[i][j], this_graf[i][k] + this_graf[k][j])
    return this_graf

n, m = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(m)]
graf = [[10 ** 10 for i in range(n)] for j in range(n)]

for i, j in ab:
    graf[i - 1][j - 1] = 1
    graf[j - 1][i - 1] = 1

import copy
cnt = 0

for i, j in ab:
    this_graf = copy.deepcopy(graf)
    tmp = 0
    this_graf[i - 1][j - 1] = 10 ** 10
    this_graf[j - 1][i - 1] = 10 ** 10
    this_graf = wf(this_graf)
    for i in range(n):
        for j in range(n):
            if this_graf[i][j] == 10 ** 10:
                tmp = 1
                break
        if tmp:
            break
    cnt += tmp

print(cnt)
s,t = input.split()
print(t.lower()+s.lower())

### FIXED CODE ###

s,t = input().split()
print(t.lower() + s.lower())
A, B, C, D = int(input())

train = [A,B]
bus = [C,D]

print(min(train) + min(bus))

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
D = int(input())

train = [A,B]
bus = [C,D]

print(min(train) + min(bus))
n=int(input())
a=[int(i) for i in input().split()]

check=0
check2=0
for i in a:
    if i%4==0:
        check+=1
    elif i%2==0:
        check2+=1
n=n-check2+1
    
else:
    print('Yes' if n//2<=check else 'No')

### FIXED CODE ###

n=int(input())
a=[int(i) for i in input().split()] 

check4=0
check2=0
for i in a:
    if i%4==0:
        check4+=1
        continue
    if i%2==0:
        check2+=1
if n==check2:
    ans='Yes'
elif check2<=1:
    if n//2<=check4:
        ans='Yes'
    else:
        ans='No'
else:
    n=n-check2
    if -(-n//2)<=check4:
        ans='Yes'
    else:
        ans='No'
print(ans)
import math

def lcm(x,y):
    return (x*y)//math.gcd(x,y)

a,b,c,d=map(int,input().split())
cn1=0
cn2=0
cn3=0
an1=0
an2=0
an3=0
cnt=0
ans=0
lm=lcm(c,d)

#bまで
cn1=b//c
cn2=b//d
cn3=b//lm
#aまで
an1=(a-1)//c
an2=(a-1)//d
an3=(a-1)//lm
#aからbまで
cn1=cn1-an1
cn2=cn2-an2
cn3=cn3-an3

cnt=cn1+cn2-cn3
ans=b-a-cnt

print(ans+1)


### FIXED CODE ###

def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return(a)

a,b,c,d=map(int,input().split())
cn1=0
cn2=0
cn3=0
an1=0
an2=0
an3=0
cnt=0
ans=0
lm=(c*d)//gcd(c,d)

#bまで
cn1=b//c
cn2=b//d
cn3=b//lm
#aまで
an1=(a-1)//c
an2=(a-1)//d
an3=(a-1)//lm
#aからbまで
cn1=cn1-an1
cn2=cn2-an2
cn3=cn3-an3

cnt=cn1+cn2-cn3
ans=b-a-cnt

print(ans+1)
import sys
day = sys.argv[1]
if day == '22':
 print('Christmas Eve Eve Eve')
elif day == '23':
 print('Christmas Eve Eve')
elif day == '24':
 print('Christmas Eve')
elif day == '25':
 print('Christmas')

### FIXED CODE ###


day = input()
if day == '22':
 print('Christmas Eve Eve Eve')
elif day == '23':
 print('Christmas Eve Eve')
elif day == '24':
 print('Christmas Eve')
elif day == '25':
 print('Christmas')
a, b = map(int, input().split())
if (a * b) % 2　== 0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

a, b = map(int, input().split())
if (a * b) % 2 == 0:
  print('Even')
else:
  print('Odd')