Harryxun/stf_run huggingface dataset:
n,a,b=map(int,input().split())
sum=0
for i in range(n):
     if 2 <= i[-1] + i[-2] and i[-1] + i[-2] <=5:
         sum +=i[-1]+i[-2]
print(sum)

### FIXED CODE ###

n,a,b=map(int,input().split())
sum=0
for i in range(n+1):
     wa = int((i / 10000) % 10)+int((i / 1000) % 10) + int((i / 100) % 10) + int((i / 10) % 10)  + int(i % 10)
     if a <= wa and wa<=b:
         sum += i
print(sum)
def main():

    capa = []
    n = int(raw_input())
    ans = 0

    for i in range(5):
        capa.append(int(raw_input()))
    if n % sorted_capa[0] == 0:
        ans = 4 + n//sorted_capa[0]
    else:
        ans = 4 + n//sorted_capa[0] + 1
        print(ans)
    """
    people = [n]
    for i in range(5):
        people.append(0)
    print(capa,people)
    while people[-1] < n:
        for i in reversed(range(0,6)):
            if i != 0:
                people[i] += min(people[i-1],capa[i-1])
                people[i-1] -= min(people[i-1],capa[i-1])
        time += 1
        print(people,time)
    print(time)

    """
if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():

    capa = []
    n = int(raw_input())
    ans = 0

    for i in range(5):
        capa.append(int(raw_input()))
    sorted_capa = sorted(capa)
    if n % sorted_capa[0] == 0:
        ans = 4 + n//sorted_capa[0]
    else:
        ans = 4 + n//sorted_capa[0] + 1
    print(ans)
    """
    people = [n]
    for i in range(5):
        people.append(0)
    print(capa,people)
    while people[-1] < n:
        for i in reversed(range(0,6)):
            if i != 0:
                people[i] += min(people[i-1],capa[i-1])
                people[i-1] -= min(people[i-1],capa[i-1])
        time += 1
        print(people,time)
    print(time)

    """
if __name__ == "__main__":
    main()
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))


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


def lcm(a, b):
    if a > b:
        g = gcd(a, b)
    else:
        g = gcd(b, a)
    return int(a / g * b)


x = T[0]
for i in range(1, N):
    x = lcm(x, T[i])

print(x)


### FIXED CODE ###

from functools import reduce
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))


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


def lcm(a, b):
    if b > a:
        b, a = a, b
    return a * b // gcd(a, b)


x = reduce(lcm, T)
print(x)
import sys

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

if k==0:
    print(max(a))
    sys.exit()

def rf(mm):
    if mm==0:
        mm=1
#        return sum(a)
    icnt=0
    for i in range(n):
        icnt+=(a[i]-1)//mm+1
    return icnt

asum=sum(a)
m=asum//(n+k)
um=asum
lm=1
for ii in range(60):
#    print(ii,m)
    if um-lm<10:
        break
    elif rf(m)>(n+k):
        lm=m
        m=(um+lm)//2
    elif rf(m)<(n+k):
        um=m
        m=(lm+um)//2
    elif rf(m)==n+k and rf(m-1)==n+k:
        um=m
        m=(lm+um)//2
    else:
        continue
#        print(m)
#        break

for mi in range(um,lm,-1):
#    print("mi:",mi)
    if rf(mi)==(n+k) and rf(mi-1)>(n+k):
        break
print(mi)


### FIXED CODE ###

import sys

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

if k==0:
    print(max(a))
    sys.exit()

def rf(mm):
    if mm==0:
        mm=1
    icnt=0
    for i in range(n):
        icnt+=(a[i]-1)//mm+1
    return icnt

asum=sum(a)
m=asum//(n+k)
um=asum
lm=1
for ii in range(60):
    if m==1:
        break
    if rf(m)<=(n+k) and rf(m-1)>(n+k):
        break
    if um-lm<5:
        break
    if rf(m)>(n+k):
        lm=m
        m=(um+lm)//2-1
    elif rf(m)<(n+k):
        um=m
        m=(um+lm)//2-1
    else:
        um=m-1
        m=(um+lm)//2-1
#    if rf(m)==(n+k) and um-lm<5:

if um<1:
    print(1)
    sys.exit()
    
for mi in range(um,max(0,lm-1),-1):
    if rf(mi)<=(n+k) and rf(mi-1)>(n+k):
        break

print(mi)
def ans_is_zero():
    print(0)
    exit(0)

def solve():
    n=int(input())
    if n > 23: ans_is_zero()

    d=list(map(int,input().split()))
    for num in d:
        if num == 0: ans_is_zero()

    ans=0

    N = 1 << n
    for i in range(N):#left or right
        t=1

        for j in range(n):
            if (i>>j)&1: num = d[j]
            else: num = 24 - d[j]

            if (t >> num)&1:
                ret = -1
                break
        if ret == -1:
            continue

        if bin(t).count("1") < n + 1:#重複あり
            continue

        ret = 100
        prev = 0
        for j in range(1, 24):
            if ((t>>j)&1) == 0: continue
            ret = min(ret, j - prev)
            prev = j

        ret = min(ret, 24-prev)
        ans = max(ans, ret)
    print(ans)
solve()


### FIXED CODE ###

def ans_is_zero():
    print(0)
    exit(0)

def solve():
    n=int(input())
    if n > 23: ans_is_zero()

    d=list(map(int,input().split()))
    for num in d:
        if num == 0: ans_is_zero()

    ans=0

    N = 1 << n
    for i in range(N):#left or right
        t=1
        ret = 100
        for j in range(n):
            if (i>>j)&1: num = d[j]
            else: num = 24 - d[j]

            if (t >> num)&1:
                ret = -1
                break
            t |= (1 << num)
        
        if ret == -1:
            continue

        if bin(t).count("1") < n + 1:#重複あり
            continue

        prev = 0
        for j in range(1, 24):
            if ((t>>j)&1) == 0: continue
            ret = min(ret, j - prev)
            prev = j

        ret = min(ret, 24-prev)
        ans = max(ans, ret)
    print(ans)
solve()
result = 0
s = input()
for i in s:
    if i == ‘+’:
        result = result + 1
    else:
        result = result - 1
print(result)

### FIXED CODE ###

result = 0
s = input()

for i in s:
    if i == '+':
        result = result + 1
    else:
        result = result - 1

print(result)
a,b,c=map(int,input.split());print(["No","Yes"][(a==b+c)+(b==a+c)+(c==a+b)])


### FIXED CODE ###

a,b,c=map(int,input().split());print(["No","Yes"][(a+b==c)+(b+c==a)+(c+a==b)])
n, k = list(map(int, input().split()))
que = list(map(int, input().split()))
ans = 0
pop_push = [(i, k-i) for i in range(k, math.ceil(k/2)-1, -1)]
for pop, push in pop_push:
    left_right = [(j, pop-j) for j in range(pop+1)]
    for left, right in left_right:
        ans = max(ans, sum(sorted(que[:left] + list(reversed(que))[:right])[push:]))
print(ans)

### FIXED CODE ###

import math


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

ans = 0
max_pop_cnt = min(n, k)
for pop_cnt in range(max_pop_cnt+1):
#  pop_cnt+1にしないと、pop_cntが0の場合は消えてしまう。
    for right in range(pop_cnt+1):
        for push_cnt in range((k - pop_cnt)+1):
            ans = max(ans, sum(sorted(que[:pop_cnt-right] + list(reversed(que))[:right])[push_cnt:]))
# reverseにした方がいい。-1で後ろからスライスをとると、0の場合に全部になってしまう。
print(ans)
a,b = int(input())
print(a*b , 2*(a+b))


### FIXED CODE ###

a,b = map(int,input().split())
print(a*b,2*(a+b))
N, A, B, C, D = map(int, input().split())
S = input()
s = []
for i in range(N):
    if S[i] == '.':
        s.append(0)
    else:
        s.append(1)
if C < B and B < D: #ACBDの順番
    flag = 0
    for i in range(C - A):
        if s[A + i] == 1 and s[A + i + 1] == 1:
            flag = 1
            break
    if flag == 0:
        for i in range(D - B):
            if s[B + i] == 1 and s[B + i + 1] == 1:
                flag = 1
                break
    if flag == 1:
        print('No')
    else:
        print('Yes')
elif B < C and C < D: # ABCDの順番
    flag = 0
    for i in range(D - B):
        if s[B + i] == 1 and s[B + i + 1] == 1:
            flag = 1
            break
    if flag == 0:
        for i in range(D - A):
            if s[A + i] == 1 and s[A + i + 1] == 1:
                flag = 1
                break
    if flag == 1:
        print('No')
    else:
        print('Yes')
else: #ABDCの順番
    flag = 0
    for i in range(D - B + 1):
        if s[B + i - 1] == 0 and s[B + i] == 0 and s[B + i + 1] == 0:
            flag = 1
            break
    if flag == 1:
        for i in range(C - A):
            if s[A + i] == 1 and s[A + i + 1] == 1:
                flag = 0
                break
    if flag == 1:
        print('Yes')
    else:
        print('No')


### FIXED CODE ###

N, A, B, C, D = map(int, input().split())
S = input()
s = [0]
for i in range(N):
    if S[i] == '.':
        s.append(0)
    else:
        s.append(1)
if C < B and B < D: #ACBDの順番
    flag = 0
    for i in range(C - A):
        if s[A + i] == 1 and s[A + i + 1] == 1:
            flag = 1
            break
    if flag == 0:
        for i in range(D - B):
            if s[B + i] == 1 and s[B + i + 1] == 1:
                flag = 1
                break
    if flag == 1:
        print('No')
    else:
        print('Yes')
elif B < C and C < D: # ABCDの順番
    flag = 0
    for i in range(D - B):
        if s[B + i] == 1 and s[B + i + 1] == 1:
            flag = 1
            break
    if flag == 0:
        for i in range(B - A):
            if s[A + i] == 1 and s[A + i + 1] == 1:
                flag = 1
                break
    if flag == 1:
        print('No')
    else:
        print('Yes')
else: #ABDCの順番
    flag = 0
    for i in range(D - B + 1):
        if s[B + i - 1] == 0 and s[B + i] == 0 and s[B + i + 1] == 0:
            flag = 1
            break
    if flag == 1:
        for i in range(C - A):
            if s[A + i] == 1 and s[A + i + 1] == 1:
                flag = 0
                break
    if flag == 1:
        print('Yes')
    else:
        print('No')
import sys
input = sys.stdin.readline

n = int(input())
x = [list(input().split()) for _ in range(n)]

for i in range(n):
    x[i][1] = int(x[i][1])

X = []
for i in range(len(x)):
    X.append(int(x[i][1]))
    
xx = sorted(x)
flag = True
temp = xx[0][0]
l = []
ans = []
l.append(xx[0][1])
for i in range(1, n):
    if temp == xx[i][0]:
        l.append(xx[i][1])
        flag = True
    else:
        flag = False
        l.sort(reverse=True)
        for j in l:
            ans.append(j)

        l = []
        temp = xx[i][0]
        l.append(xx[i][1])


if len(x) == 2 : ans.append(xx[i][1])


if flag:
    l.sort(reverse=True)
    for j in l:
        ans.append(j)
    
ans = [int(a) for a in ans]
for i in range(n):
    print(X.index(ans[i]) + 1)

### FIXED CODE ###

import sys
input = sys.stdin.readline

n = int(input())
x = [list(input().split()) for _ in range(n)]

for i in range(n):
    x[i][1] = int(x[i][1])

X = []
for i in range(len(x)):
    X.append(int(x[i][1]))
    
xx = sorted(x)
flag = True
temp = xx[0][0]
l = []
ans = []
l.append(xx[0][1])
for i in range(1, n):
    if temp == xx[i][0]:
        l.append(xx[i][1])
        flag = True
    else:
        flag = False
        l.sort(reverse=True)
        for j in l:
            ans.append(j)

        l = []
        temp = xx[i][0]
        l.append(xx[i][1])

if flag:
    l.sort(reverse=True)
    for j in l:
        ans.append(j)
    
ans = [int(a) for a in ans]

if len(ans) != len(X):
    ans.append(xx[i][1])
for j in range(n):
    print(X.index(ans[j]) + 1)
r = int(input())
print('{:.5f} {:.5f}'.format(3.14 * r**2,2*3.14*r))

### FIXED CODE ###

r = float(input())
import math
print('{0:f} {1:f}'.format(r**2*math.pi,2*math.pi*r))
def fun(x):
  if x==1:
    return 300000
  elif x==2:
    return 200000
  elif x==3:
    return 100000
s=input()
s=s.split()
a=eval(s[0])
b=eval(s[1])
su=0
if a==b==1:
    su+=400000
su+=fun(a)
su+=fun(b)
print(su)


### FIXED CODE ###

def fun(x):
    if x==1:
        return 300000
    elif x==2:
        return 200000
    elif x==3:
        return 100000
    else:
        return 0
s=input()
s=s.split()
a=eval(s[0])
b=eval(s[1])
su=0
if a==b==1:
    su+=400000
su+=fun(a)
su+=fun(b)
print(su)
# -*- coding: utf-8 -*-

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

new_num_list = list(set(num_list))
new_num_list.sort()

if len(new_num_list) = 1:
  ans = 0
else:
  ans = 1

count = 0

for index_1, num_1 in enumerate(num_list):
  for index_2, num_2 in enumerate(num_list):
    if index_1 > index_2:
      if num_1 % num_2 != 0:
        count += 1
  
  if count == index_1:
    ans += 1

  count = 0

print(ans)

### FIXED CODE ###

import collections
 
n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr)
s=set()
cnt=collections.Counter(arr)
 
for i in range(n):
 if arr[i] in s:
   continue
 if cnt[arr[i]]>=2:
   s.add(arr[i])
 for j in range(2,10**6//arr[i]+1):
   s.add(arr[i]*j)
ans=0
for i in range(n):
 if arr[i] in s:
   continue
 ans+=1
 
print(ans)
n = int(input())

A = []

for i in range(n):
    a = int(input())
    A.append(a)

maxa = max(A)

copy = [l for l in A if l != maxa]

maxa2 = max(copy)

for i in A:
    if i == maxa:
        print(maxa2)
    else:
        print(maxa)

### FIXED CODE ###

n = int(input())

A = []

for i in range(n):
    a = int(input())
    A.append(a)

maxa = max(A)

copy = A[:]

copy.remove(maxa)

maxa2 = max(copy)

for i in A:
    if i == maxa:
        print(maxa2)
    else:
        print(maxa)
def is_prime(a):
    if a == 1:
        return False
    i = 2
    while i * i <= a:
        if a % i == 0:
            return False
        i += 1
    return True

K = int(input())

if not is_prime(K) or K == 2:
    print(-1)

else:
    exit(1)
    print(K - 1)

### FIXED CODE ###

k = int(input())
ans = 1
x = 7
while ans <= k:
    if x % k == 0:
        print(ans)
        break
    x = x * 10 + 7
    x %= k
    ans += 1
else:
    print(-1)
from itertools import combinations, product
n=int(input())
s=[["a" for _ in range(n)] for _ in range(n)]
for i in range(n):
  s[i]=list(input())

res=0
for a in product(range(n)):
  for i,j in combinations(range(n),2):
    if(s[(i+a)%n][(j)%n]!=s[(j+a)%n][(i)%n]):
      break
  else:
    res+=1

print(res*n)


### FIXED CODE ###

from collections import defaultdict

n=int(input())
cumsum=0
a=list(map(int,input().split()))
counter=defaultdict(int)

counter[0]+=1
for k in a:
  cumsum+=k
  counter[cumsum]+=1

print(sum(map(lambda v: v*(v-1)//2,counter.values())))
n = int(input())
x = list(map(int,input().split()))
count = 1
if n >=2:
  for i in range(n-2):
    a = min(x(range(0,i,1)))
    if a >=x[i+1]:
      count+=1
    else:
      count+=0
else:
  print(count)
  exit()
  
print(count)

### FIXED CODE ###

n = int(input())
x = list(map(int,input().split()))
count = 1
m = x[0]

for i in range(1,n):
  if m >=x[i]:
    count+=1
    m = x[i]
  
print(count)
n, k = map(int, input().split())
A = list(map(int, input().split()))
L = [1]
def f(L):
    if A[L[-1]-1] not in L:
        L.append(A[L[-1]-1])
        return f(L)
    else:
        return L
P = f(L)
a = A[P[-1]-1]
j = P.index(a)
r = len(P)
l = r - j
if k+1 <= j:
    print(P[k])
else:
    print(P[j+(k-j)%l])

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

n, k = map(int, input().split())
A = list(map(int, input().split()))
L = [1]
S = {1}

def f(L, S):
    last = L[-1]-1
    if A[last] not in S:
        L.append(A[last])
        S |= {A[last]}
        return f(L, S)
    else:
        return L
P = f(L, S)
a = A[P[-1]-1]
j = P.index(a)
r = len(P)
l = r - j

if k+1 <= j:
    print(P[k])
else:
    print(P[j+(k-j)%l])
# your code goes here
import numpy as np
n=int(input())
arr=[[0]*n]
arr=arr*n
#print(arr)

A=np.array(arr)
for i in range(n):
	A[i][i]=1
	#print(A)
	A[i][(i+1)%n]=1
#print(A)

B=np.linalg.inv(A)
c=[int(i) for i in input().split()]
C=np.array(c)
x=np.matmul(C,B)
#print(x)
for i in range(-1,x.shape[0]-1):
	print(int(x[i%n]*2),end=" ")

### FIXED CODE ###

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

n=int(input())
arr=[int(i) for i in input().split()]
sum=0
for i in range(n):
    sum+=arr[i]
sum//=2
ans=0
for x in range(0,1):
    ex=0
    i=x
    while(True):
        ex+=arr[i]
        i+=2
        i%=n
        if (i+1)%n==x:
            ex+=arr[i]
            break

    ans=((ex-sum))
io=0
while(io!=n):
    print(ans*2,end=" ")
    ans=arr[(io)%n]-ans
    io+=1
N,M,C = map(int,input().split())
B = list(int,input().split())
count = 0
for i in range(N):
  a = list(int,input().split())
  for i in range(M):
    s += B[i]*a[i]
  if s+C>0:
    count+=1
print(count)

### FIXED CODE ###

N,M,C = map(int,input().split())
B = list(map(int,input().split()))
count = 0
for i in range(N):
  a = list(map(int,input().split()))
  P = C  
  for j in range(M):
    P += B[j]*a[j]
  if P>0:
    count+=1
print(count)
a, b, c, d=map(int,input().split)
k1=abs(a-b)
k2=abs(a-c)
k3=abs(b-c)
if k2<=d:
  print("Yes")
elif k1<=d or k2<=d:
  print("Yes")
else print("No")

### FIXED CODE ###

a, b, c, d=map(int,input().split())
k1=abs(a-b)
k2=abs(a-c)
k3=abs(b-c)
if k2<=d:
  print("Yes")
elif k1<=d and k3<=d:
  print("Yes")
else:
  print("No")
n = int(input())
x = [int(i) for i in input().split()]
x.sort()

ans = 10000
for p in range(1,x[-1]+1):
  sum =0
  for i in range(n):
    sum += (x[i]-p)**2
    
  ans = min(ans,sum)
  
print(ans) 

### FIXED CODE ###

n,k = map(int,input().split())
i = 0

while k**i <= n:
  i +=1
  
print(i)
import numpy as np
s = np.array(input().split())
if s[0] == s[1] and s[1] == s[2]:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

s = list(input())
if s[0] == s[1] and s[1] == s[2]:
    print("No")
else:
    print("Yes")
N = int(input())
p = list(map(int,input().split()))
count = 0
for i in range(N-1):
	if  p[i + 1] - p[i] != 1:
      count += 1
if count <= 2:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

N = int(input())
p = list(map(int,input().split()))
s = list(range(1,N+ 1))
count = 0
for i in range(N):
  if s[i] != p[i]:
    count += 1
if count == 0 or count ==2:
  print("YES")
else:
  print("NO")
# -*- coding: utf-8 -*-
INF = 1000000
n = int(input())
h = list(map(int, input().split()))
dp = [INF]*n

def chmin(a, b):
    if a > b:
        return b
    else:
        return a


def chmax(a, b):
    if a < b:
        return b
    else:
        return a


def rec(i):
    if dp[i] < INF:
        return dp[i]
    if i == 0:
        return 0
    res = INF
    res = chmin(res, rec(i-1) + abs(h[i] - h[i-1]))
    if i > 1:
        res = chmin(res, rec(i - 2) + abs(h[i] - h[i - 2]))
    dp[i] = res
    return dp[i]

print(rec(n-1))


### FIXED CODE ###

# -*- coding: utf-8 -*-
INF = 1000000000
n = int(input())
h = list(map(int, input().split()))
dp = [INF]*n
dp[0] = 0

for i in range(1, n):
    dp[i] = min(dp[i], dp[i-1] + abs(h[i] - h[i-1]))
    if i > 1:
        dp[i] = min(dp[i], dp[i - 2] + abs(h[i] - h[i - 2]))

print(dp[n-1])
for i in range(1,10):
    for j in range(1, 10):
        print str(i) + "x" + str(j) "=" + str(i*j)

### FIXED CODE ###

for i in range(1, 10):
     for j in range(1,10):
         print str(i) + "x" + str(j) + "=" + str(i*j)
def make_divisors(n):

    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()

    return divisors

def is_remainder(n):
    if n == 1:
        return True

    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            return False
    
    return True
        

A, B = [int(i) for i in input().split()]

import math
n = math.gcd(A, B)
divisors = make_divisors(n)
N = len(divisors)

count = 0
flag = [0] * N
for item in divisors:
    if is_remainder(item):
        count += 1

print(count)

### FIXED CODE ###

def make_divisors(n):

    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()

    return divisors

def is_remainder(n):
    if n == 1:
        return True

    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            return False
    
    return True
        

A, B = [int(i) for i in input().split()]

import fractions
n = fractions.gcd(A, B)
divisors = make_divisors(n)
N = len(divisors)

count = 0
flag = [0] * N
for item in divisors:
    if is_remainder(item):
        count += 1

print(count)
inr = lambda: list(map(int, input().split()))

N, Y = inr()

lmn = [-1, -1, -1]

for x in range(N+1):
    for y in range(N+a):
        z = N - x - y
        oto_sum = 10000 * x + 5000 * y + 1000 * z
        if z > 0 and oto_sum == Y:
            print(x, y, z)
            exit()

print(-1, -1, -1)

### FIXED CODE ###

inr = lambda: list(map(int, input().split()))

N, Y = inr()

lmn = [-1, -1, -1]

for x in range(N+1):
    for y in range(N-x+1):
        z = N - x - y
        oto_sum = 10000 * x + 5000 * y + 1000 * z
        if z >= 0 and oto_sum == Y:
            print(x, y, z)
            exit()

print(-1, -1, -1)
import numpy as np

(H,W,M) = map(int, input().split())
# hsum = [0]*H
# wsum = [0]*W
grid = np.zeros((H,W), dtype='int')
for _ in range(M):
    h,w = map(int, input().split())
    grid[h-1][w-1] = 1

row = grid.sum(axis=0)
col = grid.sum(axis=1)

cm = col.max()
rm = row.max()
if grid[col==cm][:, row==rm].min() == 0:
    print(cm+rm)
else:
    print(cm+rm-1)

### FIXED CODE ###

# from sys import stdin
# input = stdin.readline
(H,W,M) = map(int, input().split())
hsum = [0]*H
wsum = [0]*W
bombs = set()
for _ in range(M):
    h,w = map(int, input().split())
    hsum[h-1] += 1
    wsum[w-1] += 1
    bombs.add((h-1,w-1))

hmax = max(hsum)
wmax = max(wsum)

cross_w_zero = False
hargmax = sum(1 for x in hsum if x == hmax)
wargmax = sum(1 for x in wsum if x == wmax)
cnt = sum(1 for h,w in bombs if hsum[h] == hmax and wsum[w] == wmax)
if hargmax * wargmax == cnt:
    print(hmax + wmax - 1)
else:
    print(hmax + wmax)
import sys


def alg_combination_mod(n, r, mod):
    r = min(n - r, r)
    if r == 0:
        return 1
    else:
        denominator = 1
        for i in range(n, n - r, -1):
            denominator = (denominator * i) % mod
        molecule = 1
        for i in range(1, r + 1):
            molecule = (molecule * i) % mod
        return denominator * pow(molecule, mod - 2, mod) % mod


def solve():
    input = sys.stdin.readline
    mod = 10 ** 
if __name__ == '__main__':
    solve()


### FIXED CODE ###

import sys


def alg_combination_mod(n, r, mod):
    r = min(n - r, r)
    if r == 0:
        return 1
    else:
        denominator = 1
        for i in range(n, n - r, -1):
            denominator = (denominator * i) % mod
        molecule = 1
        for i in range(1, r + 1):
            molecule = (molecule * i) % mod
        return denominator * pow(molecule, mod - 2, mod) % mod


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n, a, b = list(map(int, input().rstrip('\n').split()))
    all_cnt = pow(2, n, mod) + mod
    a_cnt = alg_combination_mod(n, a, mod)
    b_cnt = alg_combination_mod(n, b, mod)
    print((all_cnt - a_cnt - b_cnt - 1) % mod)


if __name__ == '__main__':
    solve()
Vt = input()
print(t.replace("?", "D"))

### FIXED CODE ###

t = input()
print(t.replace("?", "D"))