Harryxun/stf_run huggingface dataset:
for i in range(int(input())):
    xa, ya, xb, yb = map(int, input().split(' '))
    n = int(input())
    ip = []
    for j in range(n):
        xs, ys, xt, yt, o, l = map(int, input().split(' '))
        d = (xb - xa) * (yt - ys) - (yb - ya) * (xt - xs)
            continue
        t0 = ((yt - ys) * (xs - xa) - (xt - xs) * (ys - ya)) / d
        t1 = ((yb - ya) * (xs - xa) - (xb - xa) * (ys - ya)) / d
        if (t0 >= 0 and t0 <= 1) and (t1 >= 0 and t1 <= 1):
            ip.append((t0, o == l))
    count = 0
    if len(ip) > 0
        ip.sort(key=lambda x: x[0])
        for j in range(len(ip) - 1):
            if ip[i][1] != ip[i + 1][1]:
                count += 1
    print(count)

### FIXED CODE ###

for i in range(int(input())):
    xa, ya, xb, yb = map(int, input().split())
    n = int(input())
    ip = []
    for j in range(n):
        xs, ys, xt, yt, o, l = map(int, input().split())
        d = (xb - xa) * (yt - ys) - (yb - ya) * (xt - xs)
        if d == 0:
            continue
        t0 = ((yt - ys) * (xs - xa) - (xt - xs) * (ys - ya)) / d
        t1 = ((yb - ya) * (xs - xa) - (xb - xa) * (ys - ya)) / d
        if (t0 > 0 and t0 < 1) and (t1 > 0 and t1 < 1):
            ip.append((t0, o == l))
    count = 0
    if len(ip) > 0:
        ip.sort(key=lambda x: x[0])
        for j in range(len(ip) - 1):
            if ip[j][1] != ip[j + 1][1]:
                count += 1
    print(count)
s = list(input())
n = len(s)
k = ['R','U','D']
g = ['L','U','D']

for i in range(n):
    if i % 2 ==0:
        if s[i] in k:
            count +=1
    else:
        if s[i] in g:
            count += 1
       
if count == n:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s = list(input())
n = len(s)
k = ['R','U','D']
g = ['L','U','D']
count =0

for i in range(n):
    if i % 2 ==0:
        if s[i] in k:
            count +=1
    else:
        if s[i] in g:
            count += 1
       
if count == n:
    print("Yes")
else:
    print("No")
s=input()
l=len(s);mod=10**9+7
dp=[[0]*13 for i in range(n)]
rem=[1,10,9,12,3,4]
for i in range(n)[::-1]:
  dig=i%6
  if s[i]=="?":
    if i==n-1:
      for j in range(10):
        dp[-1][(j*rem[dig])%13]=1
    else:
      for j in range(10):
        for h in range(13):
          dp[i][(h+j*rem[dig])%13]+=dp[i+1][h]
          dp[i][(h+j*rem[dig])%13]%=mod
print(dp[0][5])

### FIXED CODE ###

s=input()
l=len(s);mod=10**9+7
dp=[[0]*13 for i in range(l)]
rem=[1,10,9,12,3,4]
for i in range(l)[::-1]:
  dig=(l-i-1)%6
  if s[i]=="?":
    if i==l-1:
      for j in range(10):
        dp[-1][(j*rem[dig])%13]=1
    else:
      for j in range(10):
        for h in range(13):
          dp[i][(h+j*rem[dig])%13]+=dp[i+1][h]
          dp[i][(h+j*rem[dig])%13]%=mod
  else:
    a=int(s[i])
    if i==l-1:
      dp[i][(a*rem[dig])%13]=1
    else:
      for j in range(13):
        dp[i][(j+a*rem[dig])%13]+=dp[i+1][j]
        dp[i][(j+a*rem[dig])%13]%=mod
print(dp[0][5])
n = input()
s, t = input().split()
print("".join(f"{a}{b}" for a, b in zip(s, t)))

### FIXED CODE ###

n = input()
s, t = input().split()
print("".join("{}{}".format(a, b) for a, b in zip(s, t)))
n, k = map(int, input().split())
v = list(map(int, input().split()))

m = k // 2 + (k % 2)

a = [0] * (n+1)
d = [0] * (n+1)

a[0] = 0
d[n] = 0
for i in range(n):
    a[i+1] = a[i] + v[i]
    d[n-1-i] = d[n-i] + v[n-1-i]

w = []
for i in range(n):
    w.append([v[i], i])

w.sort()

ans = 0

#print(a)
#print(d)

for i in range(m):
    p = k - i
    for j in range(p+1):
        #print(j, n-p-j, a[j], d[n-p-j])
        temp = a[j] + d[n-p+j]
        c = 0
        for _ in range(i):
            if w[c][0] >= 0:
                break
            if w[c][1] < j or w[c][1] > n-p+j:
                temp -= w[c][0]
            c += 1
            if c >= n:
                break
        ans = max(temp, ans)

print(ans)

### FIXED CODE ###

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

m = k // 2 + (k % 2)

a = [0] * (n+1)
d = [0] * (n+1)

a[0] = 0
d[0] = 0
for i in range(n):
    a[i+1] = a[i] + v[i]
    d[i+1] = d[i] + v[n-1-i]

w = []
for i in range(n):
    w.append([v[i], i])

w.sort()

ans = 0

p = min(n, k)
for L in range(p + 1):
    for R in range(p + 1 - L):
        #print(L, R)
        temp = a[L] + d[R]
        b = min(L + R, k - L - R)
        c = 0
        while b > 0:
            if w[c][0] >= 0:
                break
            if w[c][1] < L or w[c][1] > n - 1 - R:
                #print(w[c][1], L, R)
                temp -= w[c][0]
                b -= 1
            c += 1
        #print(L, R, temp, b)
        ans = max(ans, temp)

print(ans)
from sys import
input = sys.stdin.readline

n = int(input())
task = []
time_total = [-1 for i in range(n)]
for i in range(n):
    task.append([int(i) for i in input().split()])
task_sorted = sorted(task, key = lambda x:x[1])
time_total[0] = task_sorted[0][0]
for i in range(n - 1):
    time_total[i + 1] = time_total[i] + task_sorted[i + 1][0]
for i in range(n):
    if time_total[i] > task_sorted[i][1]:
        print("No")
        exit()
print("Yes")

### FIXED CODE ###

import sys
input = sys.stdin.readline

n = int(input())
task = []
time_total = [-1 for i in range(n)]
for i in range(n):
    task.append([int(i) for i in input().split()])
task_sorted = sorted(task, key = lambda x:x[1])
time_total[0] = task_sorted[0][0]
for i in range(n - 1):
    time_total[i + 1] = time_total[i] + task_sorted[i + 1][0]
for i in range(n):
    if time_total[i] > task_sorted[i][1]:
        print("No")
        sys.exit()
print("Yes")
3200
pink

### FIXED CODE ###

a = int(input())
s = input()
if a>=3200:
    print(s)
else:
    print('red')
import fractions
A,B = map(int,input().split())

import math


def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    prime = []
    limit = math.sqrt(n)
    data = [i + 1 for i in range(1, n)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]
Max = max(A,B)
def koyaku(a,b,arr):
    for i in range(2,Max+1):
        if a%i==0 and b%i==0:
            arr.append(i)
    return arr
Koyaku =[]
cnt = 0
Koyaku = koyaku(A,B,Koyaku)
data = get_sieve_of_eratosthenes(Max)
for i in Koyaku:
    if i in data:
        cnt+=1
print(cnt+1)

### FIXED CODE ###

import fractions
import collections
import math
A,B = map(int,input().split())
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    
    return arr
Gcd = fractions.gcd(A,B)
ans = factorization(Gcd)
print(len(ans)+1)
x=input()

if x>=30:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

x=int(input())

if x>=30:
  print('Yes')
else:
  print('No')
a, b = map(int, input().sprit())

# 演算子%は余りを出す　//は小数切り捨てて整数値を出す
if (a + b) % 2 == 0:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')

### FIXED CODE ###

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

# 演算子%は余りを出す　//は小数切り捨てて整数値を出す
if (a + b) % 2 == 0:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')
n = int(input())
nums = [int(i) for i in input().split()]

bool = True
for i in range(0, len(nums), 1):
    t = nums[i] - 1
    if t > nums[i+1]:
        bool = False

if bool:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

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

for i in range(1, n, 1):
    if nums[i] < nums[i - 1]:
        print("No")
        exit()

    if nums[i] > nums[i - 1]:
        nums[i] -= 1

print("Yes")
def diverta19_c():
    _ = int(readline())
    S = [ln.strip().decode('UTF-8') for ln in read().split()]

    # _AB_ , B_A , B_ , _A の個数をそれぞれ数える
    inner, st, ed, sted = 0, 0, 0, 0
    for si in S:
        inner += si.count('AB')
        if si[0] == 'B' and si[-1] == 'A': sted += 1
        elif si[0] == 'B': st += 1
        elif si[-1] == 'A': ed += 1

    ans = inner  # これは確定
    if sted > 0:
        ans += (sted - 1)  # x個でx-1組のABができる
        if st > 0:
            ans += 1  # B_A + B_ で1組
            st -= 1
        if ed > 0:
            ans += 1  # _A + B_A で1組
            ed -= 1
    ans += min(st, ed)  # _A + B_ で1組
    print(ans)

diverta19_c()

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def diverta19_c():
    _ = int(readline())
    S = [ln.strip().decode('UTF-8') for ln in read().split()]

    # _AB_ , B_A , B_ , _A の個数をそれぞれ数える
    inner, st, ed, sted = 0, 0, 0, 0
    for si in S:
        inner += si.count('AB')
        if si[0] == 'B' and si[-1] == 'A': sted += 1
        elif si[0] == 'B': st += 1
        elif si[-1] == 'A': ed += 1

    ans = inner  # これは確定
    if sted > 0:
        ans += (sted - 1)  # x個でx-1組のABができる
        if st > 0:
            ans += 1  # B_A + B_ で1組
            st -= 1
        if ed > 0:
            ans += 1  # _A + B_A で1組
            ed -= 1
    ans += min(st, ed)  # _A + B_ で1組
    print(ans)

diverta19_c()
d = input()

if d == "25":
    print("Christmas")
elif d == "24":
    print("Christmas Eve")
elif d == "23":
    print("Christmas Eve Eve")
    elif d == "22"
    print("Christmas Eve Eve Eve")


### FIXED CODE ###


d = input()

if d == "25":
    print("Christmas")
elif d == "24":
    print("Christmas Eve")
elif d == "23":
    print("Christmas Eve Eve")
elif d == "22":
    print("Christmas Eve Eve Eve")
N = int(input())
x, y, h = [[0]*N, [0]*N, [0]*N]
hi = 0
for n in range(N):
  x[n], y[n], h[n] = map(int, input().split())
  if h[n] > 0:
    hi = n

def f():
  for xx in range(101):
    for yy in range(101):
      height = abs(xx-x[hi])+abs(yy-y[hi])+h[hi]
      flag = 1
      for n in range(N):
        if max(height-abs(xx-x[n])-abs(yy-y[n]), 0) is not h[n]:
          flag = 0
      if flag == 1:
        return [xx, yy, height]
print(*f())

### FIXED CODE ###

N = int(input())
x, y, h = [[0]*N, [0]*N, [0]*N]
for n in range(N):
  x[n], y[n], h[n] = map(int, input().split())
  if h[n] > 0:
    hi = n

def g(xx, yy, height):
  for n in range(N):
    if max(height-abs(xx-x[n])-abs(yy-y[n]), 0) != h[n]:
      return False
  return True

def f():
  for xx in range(101):
    for yy in range(101):
      height = abs(xx-x[hi])+abs(yy-y[hi])+h[hi]
      if g(xx, yy, height) is True:
        return [xx, yy, height]
print(*f())
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()
a = []

for i in range(n):
    a.append(ni())

a.sort()
k = n//2

if n%2 == 0:
    ans = (sum(a[t+1:])-sum(a[:t-1]))*2+a[t]-a[t-1]
    print(ans)
else:
    x = 2*(sum(a[t+1:])-sum(a[:t-1])) - a[t-1] - a[t]
    y = 2*(sum(a[t+2:])-sum(a[:t])) + a[t+1] + a[t]
    print(max(x,y))

### FIXED CODE ###

import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()
a = []

for i in range(n):
    a.append(ni())

a.sort()
t = n//2

if n%2 == 0:
    ans = (sum(a[t+1:])-sum(a[:t-1]))*2+a[t]-a[t-1]
    print(ans)
else:
    x = 2*(sum(a[t+1:])-sum(a[:t-1])) - a[t-1] - a[t]
    y = 2*(sum(a[t+2:])-sum(a[:t])) + a[t+1] + a[t]
    print(max(x,y))
#include <bits/stdc++.h>
using namespace std;
  
int main() {
  string S;
  cin >> S;
  
  int bucket[26]={0};//バケット
  
  for(int i=0;i<S.length();i++){
    int tmp= S.at(i)-'a';
    bucket[tmp]++;
  }
  
  int ans=-1;//答えを格納
  for(int i=0; i<26; i++){
    if (bucket[i]==0){
      ans=i;
      break;
    }
  }
  
  if(ans==-1){
    cout << "None" << endl;
  }else{
    printf("%c\n",ans+97);
  }
      
}

### FIXED CODE ###

S=str(input())

import string
alphabet="".join([i for i in string.ascii_lowercase if i not in S])

if(alphabet):
  print(alphabet[0])
else:
  print("None")
N, M, X = map(int, input().split())
Ca = [list(map(int, input().split())) for _ in range(N)]
pattern = []
for i in range(2**N):
    lis = []
    for j in range(N):
        if ((i>>j)&1):
            lis.append(Ca[j])
    pattern.append(lis)

cnt = []
for i in range(2**N):
    g = [0]*4
    for j in range(len(pattern[i])):
        for k in range(M+1):
            g[k] += pattern[i][j][k]
    if g[1]<X or g[2]<X or g[3]<X:
        continue
    else:
        cnt.append(g[0])
print(min(cnt))


### FIXED CODE ###

N, M, X = map(int, input().split())
Ca = [list(map(int, input().split())) for _ in range(N)]
pattern = []
for i in range(2**N):
    lis = []
    for j in range(N):
        if ((i>>j)&1):
            lis.append(Ca[j])
    pattern.append(lis)

cnt = []
for i in range(2**N):
    g = [0] * (M+1)
    for j in range(len(pattern[i])):
        for k in range(M+1):
            g[k] += pattern[i][j][k]
    if M==1 and g[1]< X:
        continue
    elif M>1 and min(g[1:M+1]) < X:
        continue
    else:
        cnt.append(g[0])
if len(cnt) ==0:
    print(-1)
else:
    print(min(cnt))
import math
r = int(input())

print(r * r *math.pi, 2*r*math.pi)

### FIXED CODE ###

import math
r = float(input())

print(r * r *math.pi, 2*r*math.pi)
l = list(input())
for i in range(2):
  a = l[i]
  count = 0
  for j in range(i,i+3):
    if a == l[l]:
      count += 1
  if count == 3:
    print("Yes")
    exit()
print("No")

### FIXED CODE ###

l = list(input())
for i in range(2):
  a = l[i]
  count = 0
  for j in range(i,i+3):
    if a == l[j]:
      count += 1
  if count == 3:
    print("Yes")
    exit()
print("No")
n =int(input())
import fraction
ans = 1
for _ in range(n):
    t = int(input())
    ans = ans * t // fraction.gcd(ans, t)
print(ans)

### FIXED CODE ###

n =int(input())
import fractions
ans = 1
for _ in range(n):
    t = int(input())
    ans = ans * t // fractions.gcd(ans, t)
print(ans)
import math
N,K = map(int,input().split())

W = 10**9+7

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
    a = combinations_count(N-K+1, i) % W
    b = combinations_count(K-1, i-1) % W
    print((a*b) % W)




### FIXED CODE ###

import math
N,K = map(int,input().split())

W = 10**9+7

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
    if (N-K+1) >= i and K-1 >= i-1:
        a = combinations_count(N-K+1, i) % W
        b = combinations_count(K-1, i-1) % W
        print((a*b) % W)
    else:
        print(0)
x,a = map(int(input.split()))
if x<a:
  print(0)
else :
  print(10)

### FIXED CODE ###

a,b = map(int,input().split())
if a < b:
  print(0)
else :
  print(10)
def factorization(n):
    i = 2
    factors = []
    while i <= math.floor(n**0.5):
        if n%i == 0:
            factors.append(i)
            n //= i
        else:
            i += 1
    if n>1:
        factors.append(n)
    return factors
#約数列挙
N = int(input())
ls = []
for i in range(1,N+1):
    ls.extend(factorization(i))
ls.sort()
ans = 1
now = 1
now_2 = 0
for i in range(len(ls)):
    if i == 0:
        now_2 = ls[i]
    else:
        if ls[i] == now_2:
            now += 1
        else:
            ans *= (now+1)
            now = 1
            now_2 = ls[i]
ans *= (now+1)
print(ans%(10**9+7))

### FIXED CODE ###

import math
def factorization(n):
    i = 2
    factors = []
    while i <= math.floor(n**0.5):
        if n%i == 0:
            factors.append(i)
            n //= i
        else:
            i += 1
    if n>1:
        factors.append(n)
    return factors
#約数列挙
N = int(input())
ls = []
if N == 1:
    print(1)
else:
    for i in range(1,N+1):
        ls.extend(factorization(i))
    ls.sort()
    ans = 1
    now = 1
    now_2 = 0
    for i in range(len(ls)):
        if i == 0:
            now_2 = ls[i]
        else:
            if ls[i] == now_2:
                now += 1
            else:
                ans *= (now+1)
                now = 1
                now_2 = ls[i]
    ans *= (now+1)
    print(ans%(10**9+7))
#import math
r = input()
#m = (r ** 2) * math.pi
#l = r * 2 * math.pi
m = (r ** 2) * 3.14
l = r * 2 * 3.14
print('{} {}'.format(m, l))

### FIXED CODE ###

import math
r = float(input())
m = r ** 2 * math.pi
l = r * 2 * math.pi
print('{:.6f} {:.6f}'.format(m, l))
a,b = map(int, input(),split())
if a+b > 23:
  print(24-a+b)
else:
  print(a+b)

### FIXED CODE ###

a,b = map(int, input().split())
if a+b > 23:
  print(a+b-24)
else:
  print(a+b)
import sys
sys.setrecursionlimit(10000)
n, m = map(int, input().split())
G = [[] for _ in range(n)]
for _ in range(m):
    x, y = map(lambda x: int(x)-1, input().split())
    G[x].append(y)

# iを始点としたときの有効パスの最大長さ
dp = [-1] * n

def rec(s):
    if dp[s] != -1:
        return dp[s]
    
    ret = 0
    for ns in G[s]:
        ret = max(ret, rec(ns)+1)
    dp[s] = ret
    return ret

ml = 0    
for i in range(n):
    ml = max(ml, rec(i))

print(ml)


### FIXED CODE ###

import sys
sys.setrecursionlimit(500000)
n, m = map(int, input().split())
G = [[] for _ in range(n)]
for _ in range(m):
    x, y = map(lambda x: int(x)-1, input().split())
    G[x].append(y)

# iを始点としたときの有効パスの最大長さ
dp = [-1] * n
 
def rec(s):
    if dp[s] != -1:
        return dp[s]

    ret = 0
    for ns in G[s]:
        ret = max(ret, rec(ns)+1)
    dp[s] = ret
    return ret

ml = 0    
for i in range(n):
    ml = max(ml, rec(i))
print(ml)
a,b=map(int,input().split())
print(print a*2 if a==b else max(a,b) * 2 -1)

### FIXED CODE ###

a, b = map(int, input().split())
print(max(a, b) * 2) if a == b else print(max(a, b) * 2 - 1)
N=int(input())
X=list(map(int,input().split()))
dispersion=[]
cnt=0
for i in range(min(X),max(X)):
    for j in range(N):
        cnt+=abs(X[j]-i)**2
    dispersion.append(cnt)
    cnt=0
print(min(dispersion))

### FIXED CODE ###

N=int(input())
X=list(map(int,input().split()))
dispersion=[]
cnt=0
for i in range(100):
    for j in range(N):
        cnt+=abs(X[j]-i)**2
    dispersion.append(cnt)
    cnt=0
print(min(dispersion))
a=int(input())
if(a<4):print(1)
else:
  ma=1
  for i in range(1,int(sqrt(a))):
    for j in range(2,1000):
      x=i**j
      if(x>a):break
      ma=max(ma,x)
  print(ma)
      

### FIXED CODE ###

a=int(input())
if(a<4):print(1)
else:
  ma=1
  for i in range(1,int(a**0.5)+1):
    for j in range(2,1000):
      x=i**j
      if(x>a):break
      ma=max(ma,x)
  print(ma)
c = 0

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


### FIXED CODE ###

c = 0

while True:
    x = int(input())
    c +=1
    
    if x == 0:
        break
   
    print("Case {}: {}".format(c, x))
import heapq

N,M = map(int, input().split())
List=list(map(-int,input().split()))

heapq.heapify(List)

for i in range(M):
  a = (-heapq.heappop(List)) // 2
  heapq.heappush(List, -a)
  
print(int(sum(List)))

### FIXED CODE ###

import heapq

N,M = map(int, input().split())
List1=list(map(int,input().split()))
List=[]

for i in range(N):
  a = List1[i]
  List.append(-a)

heapq.heapify(List)

for i in range(M):
  a = (-heapq.heappop(List)) // 2
  heapq.heappush(List, -a)
  
print(int(-sum(List)))
import collections
#入力
N = int(input())
n = 100000
Alist = list(map(int,input().split()))
Q = int(input())
Blist = []
Clist = []
for i in range(Q):
  B, C = map(int,input().split())
  Blist.append(B)
  Clist.append(C)

Adic = dict(collections.Counter(Alist))
numlist = [0]*n

for j in range(n):
  if j in Adic:
    numlist[j] = Adic[j]
sum = sum(Alist)
for k in range(Q):
  sum += (Clist[k]-Blist[k])*numlist[Blist[k]]
  numlist[Clist[k]] += numlist[Blist[k]] 
  numlist[Blist[k]] = 0

  print(sum)

### FIXED CODE ###

import collections
#入力
N = int(input())
n = 100001
Alist = list(map(int,input().split()))
Q = int(input())
Blist = []
Clist = []
for i in range(Q):
  B, C = map(int,input().split())
  Blist.append(B)
  Clist.append(C)

Adic = dict(collections.Counter(Alist))
numlist = [0]*n

for j in range(n):
  if j in Adic:
    numlist[j] = Adic[j]
sum = sum(Alist)
for k in range(Q):
  sum += (Clist[k]-Blist[k])*numlist[Blist[k]]
  numlist[Clist[k]] += numlist[Blist[k]] 
  numlist[Blist[k]] = 0

  print(sum)
OK = 0
BRO = 1

N,M=map(int, input().split())
Broken=[int(input()) for i in range(M)]
#K = "".join(list(BRO if i in Broken else OK for i in range(N+1)))
K = list(0 for i in range(N+1))
for i in range(M):
  K[Broken[i]] = 1
  
if BRO+BRO in K:
  print(0)
else:
  c=[0 for i in range(N+1)]
  if K[N-1]==OK:
    c[1]=1
  if K[N-2]==OK and K[N-1]==OK:
    c[2]=2
  if K[N-2]==OK and K[N-1]==BRO:
    c[2]=1

  for i in range(3,N+1):
    if K[N-i]==OK:
      if K[N-i+1]==OK and K[N-i+2]==OK:
        c[i]=c[i-1]+c[i-2]
      if K[N-i+1]==OK and K[N-i+2]==BRO:
        c[i]=c[i-1]
      if K[N-i+1]==BRO and K[N-i+2]==OK:
        c[i]=c[i-2]
    c[i]%=1000000007
  
  print(c[N] % 1000000007)


### FIXED CODE ###

OK = 0
BRO = 1
MOD = 1000000007

N,M=map(int, input().split())
Broken=[int(input()) for i in range(M)]
#K = "".join(list(BRO if i in Broken else OK for i in range(N+1)))
K = list(0 for i in range(N+1))
for i in range(M):
  K[Broken[i]] = 1
  
dp=[0 for i in range(N+1)]
dp[0]=1
for i in range(N):
  for j in range(i+1,min(i+2+1,N+1)):
    if K[j]==OK:
      dp[j]+=dp[i]
      dp[j]%=MOD
      
print(dp[N])
def main():
  k, s = map(int, input().split())
  cnt = 0
  for i in range(k+1):
    for j in range(k+1):
      if 0 <= s - i - j <= k:
        cnt += 1
  print(cnt)

if __name__ == "__main__":
    main()

### FIXED CODE ###

s = input().split(",")
print(*s)
from collections import defaultdict
from sys import setrecursionlimit, getrecursionlimit

setrecursionlimit(10*getrecursionlimit())

N = int(input())
g = defaultdict(list)
K = []
for i in range(N-1):
    a, b = map(int, input().split())
    g[a].append(b)
    g[b].append(a)
    K.append((a,b))

C = sorted([int(i) for i in input().split()], reverse=True)

a = {i:0 for i in range(1, N+1)}

visited = defaultdict(bool)
ct = 0
def dfs(v):
    global ct
    visited[v] = True
    a[v] = C[ct]
    ct += 1
    for c in g[v]:
        if not visited[c]:
            dfs(c)

dfs(1)

ans1 = 0
ans2 = ' '.join([str(b) for b in a.values()])
for b, c in K:
    ans1 += min(a[b], a[c])

print(ans1)
print(ans2)

### FIXED CODE ###

from collections import defaultdict
from sys import setrecursionlimit, getrecursionlimit

setrecursionlimit(100*getrecursionlimit())

N = int(input())
g = defaultdict(list)
K = []
for i in range(N-1):
    a, b = map(int, input().split())
    g[a].append(b)
    g[b].append(a)
    K.append((a,b))

C = sorted([int(i) for i in input().split()], reverse=True)

a = {i:0 for i in range(1, N+1)}

visited = defaultdict(bool)
ct = 0
def dfs(v):
    global ct
    visited[v] = True
    a[v] = C[ct]
    ct += 1
    for c in g[v]:
        if not visited[c]:
            dfs(c)

dfs(1)

ans1 = 0
ans2 = ' '.join([str(b) for b in a.values()])
for b, c in K:
    ans1 += min(a[b], a[c])

print(ans1)
print(ans2)
A,B,C=map(int,input().slpit())

if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)

### FIXED CODE ###

A, B, C = map(int, input().split())
 
if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)