Harryxun/stf_run huggingface dataset:
x, y = map(int, input().split())
tmp = 2*y - x
if tmp%3 != 0:
    print(0)
    exit()
up = tmp // 3
total = y - up*2 + up

n = total
k = up
mod = 10**9 + 7

modinv_table = [-1] * (k+1)
modinv_table[1] = 1
for i in range(2, k+1):
    modinv_table[i] = (-modinv_table[mod % i] * (mod // i)) % mod

def binomial_coefficients(n, k):
    ans = 1
    for i in range(k):
        ans *= n-i
        ans *= modinv_table[i + 1]
        ans %= mod
    return ans

try:
    print(binomial_coefficients(n, k))
except:
    print(0)

### FIXED CODE ###

x, y = map(int, input().split())
tmp = 2*y - x
if tmp%3 != 0:
    print(0)
    exit()
up = tmp // 3
total = y - up*2 + up

n = total
k = up
mod = 10**9 + 7

#print(n)
#print(k)

if k == 0:
    print(1)
    exit()
try:
    modinv_table = [-1] * (k+1)
    modinv_table[1] = 1
    for i in range(2, k+1):
        modinv_table[i] = (-modinv_table[mod % i] * (mod // i)) % mod
except:
    k = total - up
    modinv_table = [-1] * (k + 1)
    modinv_table[1] = 1
    for i in range(2, k + 1):
        modinv_table[i] = (-modinv_table[mod % i] * (mod // i)) % mod

def binomial_coefficients(n, k):
    ans = 1
    for i in range(k):
        ans *= n-i
        ans *= modinv_table[i + 1]
        ans %= mod
    return ans

print(binomial_coefficients(n, k))
import math
n = input()
a = list(map(int, input().split()))
for i in a:
    ans = bin(i).find("1") - 1
print(round(ans))

### FIXED CODE ###

print(input().count("1"))
A, B = input().split
print(math.gcd(int(A), int(B)))

### FIXED CODE ###

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

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)
A, B = input().split()
print(lcm(int(A), int(B)))
#ABC140_C
N=int(input())
A=[0]*N
B=[int(i) for i in input().split()]
A[0]=B[0]

for i in range(1,N):
    A[i]=max(A[i-1],B[i-1],B[i])
print(*A)

### FIXED CODE ###

#ABC140_C
N=int(input())
A=[0]*N
B=[int(i) for i in input().split()]
A[0]=B[0]

for i in range(1,N-1):
    A[i]=min(B[i-1],B[i])
A[N-1]=B[N-2]

print(sum(A))
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
N = int(input())
AB = [tuple(map(int,input().split())) for i in range(N-1)]
if N==2:
    print(1,2)
    exit()
es = [[] for i in range(N)]
for a,b in AB:
    a,b = a-1,b-1
    es[a].append(b)
    es[b].append(a)

depth = [-1]*N
depth[0] = 0
def dfs(v,p=-1):
    for to in es[v]:
        if to==p: continue
        depth[to] = depth[v] + 1
        dfs(to,v)
dfs(0)

g1 = []
g2 = []
for i,d in enumerate(depth):
    if d%2:
        g2.append(i)
    else:
        g1.append(i)
if len(g1) < len(g2):
    g1,g2 = g2,g1

ans = [None] * N
if len(g2) <= N//3:
    for n in range(1,N+1):
        if n%3==0 and g2:
            i = g2.pop()
        else:
            i = g1.pop()
        ans[i] = n
else:
    for n in range(1,N+1):
        if n%3==1:
            i = g1.pop()
        elif n%3==2:
            i = g2.pop()
        else:
            if g1:
                i = g1.pop()
            else:
                i = g2.pop()
        ans[i] = n
print(*ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
N = int(input())
AB = [tuple(map(int,input().split())) for i in range(N-1)]
if N==2:
    print(1,2)
    exit()
es = [[] for i in range(N)]
for a,b in AB:
    a,b = a-1,b-1
    es[a].append(b)
    es[b].append(a)

depth = [-1]*N
depth[0] = 0
def dfs(v,p=-1):
    for to in es[v]:
        if to==p: continue
        depth[to] = depth[v] + 1
        dfs(to,v)
dfs(0)

g1 = []
g2 = []
for i,d in enumerate(depth):
    if d%2:
        g2.append(i)
    else:
        g1.append(i)
if len(g1) < len(g2):
    g1,g2 = g2,g1

ans = [None] * N
if len(g2) <= N//3:
    for n in range(1,N+1):
        if n%3==0:
            if g2:
                i = g2.pop()
            else:
                i = g1.pop()
        else:
            i = g1.pop()
        ans[i] = n
else:
    for n in range(1,N+1,3):
        i = g1.pop()
        ans[i] = n
    for n in range(2,N+1,3):
        i = g2.pop()
        ans[i] = n
    for n in range(3,N+1,3):
        if g1:
            i = g1.pop()
        else:
            i = g2.pop()
        ans[i] = n
print(*ans)
A, B, C, D = map(int,input().split())

if(B < C or D < A):
	print(0)

else:
	if(A > C):
		E = A
	else:
		E = C

	if(B > D):
		F = D
	else:
		F = B

print(F - E)


### FIXED CODE ###

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

if(B < C or D < A):
	print(0)

else:
	if(A > C):
		E = A
	else:
		E = C

	if(B > D):
		F = D
	else:
		F = B

	print(F - E)
a,b,c = input().split()

if a == R:
    if b == R:
        if c == R:
            print(3)
        else:
            print(2)
    else:
        print(1)
else:
    if b == R:
        if c == R:
            print(2)
        else:
            print(1)
    else:
        if c == R:
            print(1)
        else:
            print(0)

### FIXED CODE ###

A = list(input())

n = A.count('R')
if n != 2:
    print(n)
else:
    m = A.index('S')
    if m == 1:
        print(1)
    else:
        print(2)
n, m = map(int,input().split())
a = sorted(map(int,input().split()))[::-1]
c = [0,2,5,5,4,5,6,3,7,6]
dp = [-float('inf')]*(n+1)
dp[0] = 0
for i in range(2, n+1):
    for j in a:
        if i >= j:
            dp[i] = max(dp[i], dp[i-c[j]]+1)
r = []
while n:
    i = max((i for i in a if n>=c[i]), key=lambda x: dp[n-c[x]])
    r.append(i)
    n -= c[i]
print(''.join(map(str, r)))

### FIXED CODE ###

n, m = map(int,input().split())
a = sorted(map(int,input().split()))[::-1]
c = [0,2,5,5,4,5,6,3,7,6]
dp = [-float('inf')]*(n+1)
dp[0] = 0
for i in range(2, n+1):
    for j in a:
        if i >= c[j]:
            dp[i] = max(dp[i], dp[i-c[j]]+1)
r = []
while n:
    i = max((i for i in a if n>=c[i]), key=lambda x: dp[n-c[x]])
    r.append(i)
    n -= c[i]
print(''.join(map(str, r)))
n = int(input())
print(int((n**.5)**2)

### FIXED CODE ###

n=int(input())
print(int(n**.5)**2)
l = raw_input().split()
w1 =  l[0].upper()
w2 =  l[1].upper()
w3 =  l[2].upper()
print w1[:1] + w2[:1] + w3[:1]

### FIXED CODE ###

l = raw_input().split()
w1 =  l[0].upper()
w2 =  l[1].upper()
w3 =  l[2].upper()
print w1[:1] + w2[:1] + w3[:1]
import fraction
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

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

p=gcd_list(a)

print(p)




### FIXED CODE ###

import fractions
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

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

p=gcd_list(a)

print(p)
s=input()
K=int(input())

for i,c in enumerate(s):
    if c!='a' and ord('z')+1-ord(c)<=K:
        K-=ord('z')+1-ord(c)
        s=s[:i]+'a'+s[i+1:]
s=s[:-1]+chr(ord(s[-1])+K)

print(s)

### FIXED CODE ###

s=input()
K=int(input())
ans=''
for c in s:
    if c!='a' and ord('z')+1-ord(c)<=K:
        ans+='a'
        K-=ord('z')+1-ord(c)
    else:
        ans+=c
if K>0:
    ans=ans[:-1]+chr(ord(ans[-1])+K%26)

print(ans)
N, K, L = map(int, input().split())

par = [i for i in range(N)]
size = [1] * N


def find(x, P):
    if P[x] == x:
        return x
    else:
        return find(P[x], P)

def unite(x, y):
    root_x = find(x, par)
    root_y = find(y, par)
    if root_y > root_x:
        par[root_x] = root_y
    else:
        par[root_y] = root_x

par2 = [i for i in range(N)]
def unite2(x, y):

    x = find(x, par2)
    y = find(y, par2)

    if x != y:
        # xとyの属している集合が異なる時
        par2[x] = y
        s = size[x] + size[y]
        size[y] = s

for _ in range(K):
    p, q = map(int, input().split())
    find(q-1, par)

    unite(p-1, q-1)


#print(par)

root =[find(i, par) for i in range(N)]

#print(root)

#find(0,par)

#print(par)

for _ in range(L):
    p, q = map(int, input().split())
    s = root[p-1]
    t = root[q-1]
    if s == t:
        unite2(p-1, q-1)

#print(par2)

for i in range(N-1):
    p = find(i, par2)
    print(size[p], end=' ')
print(size[find(N-1, par2)])

### FIXED CODE ###

from collections import Counter

n,k,l=map(int,input().split())
city1=[i for i in range(n)]
city2=[i for i in range(n)]

def root(c,x):
  if x==c[x]:
    return x
  else:
    c[x]=root(c,c[x])
    return c[x]

def union(c,x,y):
  rx=root(c,x)
  ry=root(c,y)
  if rx>ry:
    c[rx]=ry
  else:
    c[ry]=rx

for i in range(k):
  a,b=map(int,input().split())
  union(city1,a-1,b-1)
for i in range(l):
  a,b=map(int,input().split())
  union(city2,a-1,b-1)
r=[]
for i in range(n):
  r.append((root(city1,i),root(city2,i)))
c=Counter(r)
for i in range(n):
  ans=c[r[i]]
  if i==n-1:
    print(ans)
  else:
    print(ans,end=' ')
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))

a,b,c = input().split()

if (c-a >=0) and (b-c >= 0):
    
    print("Yes")
else:
    print("No")



### FIXED CODE ###

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

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

if (a <= c) and (c <= b):
    print("Yes")
else:
    print("No")
S = input()


if (S = "ABC"):
    print("ARC")
if (S = "ARC"):
    print("ABC")

### FIXED CODE ###

S = input()


if (S == "ABC"):
    print("ARC")
if (S == "ARC"):
    print("ABC")
a = int(input())
b = int(input())

if (a*b)%2 == 0:
  'Even'
else:
  'Odd'
  


### FIXED CODE ###

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

if a*b %2 == 0:
  judge = 'Even'
else:
  judge='Odd'

print(judge)
import pysnooper

@pysnooper.snoop()
def rec(n,me,stair):
    if me[n-1]!=0:
        return me[n-1]
    elif n in stair:
        return 0
    elif n==1:
        if n-1 in a:
            me[n-1]=0
            return 0
        me[n-1]=1
        return 1
    elif n==2:
        test1=n-1 in a
        test2=n-2 in a
        if test1 and test2:
            me[n-1]=0
            return 0
        elif test1 or test2:
            me[n-1]=1
            return 1
        me[n-2]=2
        return 2
    else:
        ans=rec(n-2,me,stair)+rec(n-1,me,stair)
        me[n-1]=ans
        return ans

n,m=map(int,input().split())
a=[int(input()) for _ in range(m)]
memo=[0]*(n+1)
print(rec(n,memo,a)%1000000007)


### FIXED CODE ###

n,m=map(int,input().split())
stair_m=[True]*(110000)
for i in range(m):
    a=int(input())
    stair_m[a]=False
dp=[0]*(110000)
dp[0]=1
for i in range(1,n+1):
    if stair_m[i]:
        dp[i]=dp[i-1]+dp[i-2]
    else:
        dp[i]=0
print(dp[n]%1000000007)
N=int(input())
X=input()
def fx(n,c):
    if c==0:
        return 0
    b=n%c
    if b==0:
        return 1
    if b==1 or b==2:
        return 2
    t=bin(b).count("1")
    return fx(b,t)+1
c=X.count("1")
n=int(X,2)
lp=[1]*N
lm=[1]*N
for i in range(N-2,-1,-1):
    lp[i]=2*lp[i+1]%(c+1)
    lm[i]=2*lm[i+1]%(c-1)
np=n%(c+1)
if c>1:
    nm=n%(c-1)
else:
    nm=1
for i in range(N):
    if X[i]=="0":
        print(fx(np+lp[i],c+1))
    else:
        print(fx(nm-lm[i],c-1))

### FIXED CODE ###

N=int(input())
X=input()
def fx(n,c):
    if c==0:
        return 0
    b=n%c
    if b==0:
        return 1
    if b==1 or b==2:
        return 2
    t=bin(b).count("1")
    return fx(b,t)+1
c=X.count("1")
n=int(X,2)
lp=[1]*N
lm=[1]*N
for i in range(N-2,-1,-1):
    lp[i]=2*lp[i+1]%(c+1)
    if c==1:
        lm[i]=1
    else:
        lm[i]=2*lm[i+1]%(c-1)
np=n%(c+1)
if c>1:
    nm=n%(c-1)
else:
    nm=1
for i in range(N):
    if X[i]=="0":
        print(fx(np+lp[i],c+1))
    else:
        print(fx(nm-lm[i],c-1))
import math

a, b, x = map(float, input().split())

if x * 2 <= a * a * b:
    P = (2 * x) / (a * b)
    Q = b
else:
    P = a
    Q = (2 * (a * a * b - x)) / (a * a)

R = math.sqrt(P * P + Q * Q)
cosp = (Q * Q + R * R - P * P) / (2 * Q * R)
print(90 - math.degrees(math.acos(cosp)))

### FIXED CODE ###

import math

a, b, x = map(float, input().split())

if a * a * b == x:
    print(0)
    exit(0)

if x * 2 <= a * a * b:
    P = (2 * x) / (a * b)
    Q = b
else:
    P = a
    Q = (2 * (a * a * b - x)) / (a * a)

R = math.sqrt(P * P + Q * Q)
cosp = (Q * Q + R * R - P * P) / (2 * Q * R)
print(90 - math.degrees(math.acos(cosp)))
N, M = [int(x) for x in input().split()]

if N == M:
    print((1900*M)/(2**N))
else:
    print(M * 1900+(N-M)*100)*(2**M)




### FIXED CODE ###

N, M = [int(x) for x in input().split()]

print((M * 1900+(N-M)*100)*(2**M))
from collections import Counter

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

list0 = []
list1 = []
for i, a in enumerate(v):
    if i % 2 == 0:
        list0.append(a)
    else:
        list1.append(a)

c0 = Counter(list0)
c1 = Counter(list1)

c0_most_common = c0.most_common(2)
c1_most_common = c1.most_common(2)

if c0_most_common[0][0] != c1_most_common[0][0]:
    print(n - (c0_most_common[0][1] + c1_most_common[0][1]))
else:
    print(min(n - (c0_most_common[0][1] + c1_most_common[1][1]), n - (c0_most_common[1][1] + c1_most_common[0][1])))


### FIXED CODE ###

from collections import Counter

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

list0 = []
list1 = []
for i, a in enumerate(v):
    if i % 2 == 0:
        list0.append(a)
    else:
        list1.append(a)

c0 = Counter(list0)
c1 = Counter(list1)

c0_most_common = c0.most_common(2)
c1_most_common = c1.most_common(2)

if c0_most_common[0][0] != c1_most_common[0][0]:
    print(n - (c0_most_common[0][1] + c1_most_common[0][1]))
else:
    if len(c0_most_common) >= 2 and len(c1_most_common) >= 2:
        print(min(n - (c0_most_common[0][1] + c1_most_common[1][1]), n - (c0_most_common[1][1] + c1_most_common[0][1])))
    elif len(c0_most_common) == 1 and len(c1_most_common) >= 2:
        print(n - (c0_most_common[0][1]) + c1_most_common[1][1])
    elif len(c1_most_common) == 1 and len(c0_most_common) >= 2:
        print(n - (c1_most_common[0][1]) + c0_most_common[1][1])
    else:
        print(n - (c1_most_common[0][1]))
n = list(map(int, input().split()))
a = n[0]
b = n[1]
 
if a == b:
  print(a + b)
elif a > b:
  print(a*2 - 1)
else:
  print(b*2 - 1)
n = list(map(int, input().split()))
a = n[0]
b = n[1]

if a == b:
  print(a + b)
elif a > b:
  print(a*2 - 1)
else:
  print(b*2 - 1)


### FIXED CODE ###

n = list(map(int, input().split()))
a = n[0]
b = n[1]

if a == b:
  print(a + b)
elif a > b:
  print(a*2 - 1)
else:
  print(b*2 - 1)
import fraction
n,m=map(int,input().split())
s=input()
t=input()
b=0
for i in range(n):
    if (i*m)%n==0 and (i*m)//n<m:
        if not t[(i*m)//n]==s[i]:
            b=1

if b:
    print(-1)
else:
    print(n*m//fraction.gcd(n,m))

### FIXED CODE ###

import fractions
n,m=map(int,input().split())
s=input()
t=input()
b=0
for i in range(n):
    if (i*m)%n==0 and (i*m)//n<m:
        if not t[(i*m)//n]==s[i]:
            b=1

if b:
    print(-1)
else:
    print(n*m//fractions.gcd(n,m))
import math

R = str(input())

circum = R * 2 * math.pi 

print(circum)

### FIXED CODE ###

import math

R = int(input())

circum = R * 2 * math.pi 

print(circum)
N, M = map(int, input().split())
ab = []
for i in range(N):
    ab.append(map(int, input().split()))

ans = []
for i in range(1,max(ab)+1):
    ans.append(ans.count(i))

for x in ans:
    print(x)

### FIXED CODE ###

N, M = map(int, input().split())
c = [0] * N

for _ in range(M):
    a, b = map(int, input().split())
    c[a - 1] += 1
    c[b - 1] += 1

print(*c, sep='\n')
num = list(map(int,raw_input().split()))
point = num[0]
line = num[1]

d = {}
for i in range (point):
    d[i+1] = []
for i in range(point):
    pair = list(map(int,raw_input().split()))
    d[pair[0]].append(pair[1])
    d[pair[1]].append(pair[0])
old_list = []
new_list = [[1]]
for i in range (point-1):
    old_list = new_list[:]
    new_list =[]
    for j in old_list:
        for k in d[j[-1]]:
            if k in j:
                pass
            else:
                j.append(k)
                new_list.append(j[:])
                j.pop()
print len (new_list)


### FIXED CODE ###

num = list(map(int,raw_input().split()))
point = num[0]
line = num[1]
total = 0
d = {}
for i in range (point):
    d[i+1] = []
for i in range(line):
    pair = list(map(int,raw_input().split()))
    d[pair[0]].append(pair[1])
    d[pair[1]].append(pair[0])
old_list = []
new_list = [[1]]
for i in range (point-1):
    old_list = new_list[:]
    new_list =[]
    for j in old_list:
        for k in d[j[-1]]:
            if k in j:
                pass
            else:
                j.append(k)
                new_list.append(j[:])
                j.pop()
print len (new_list)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin

for line in stdin:
    stack = []
    for s in line.split():
        if s.isdigit():
            stack.append(float(s))
        elif s == '+':
            n = stack.pop()
            stack[-1] += n
        elif s == '-':
            n = stack.pop()
            stack[-1] -= n
        elif s == '*':
            n = stack.pop()
            stack[-1] *= n
        elif s == '/':
            n = stack.pop()
            stack[-1] /= n
    print('{:.6f}'.format(stack[-1]))

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin
import re

for line in stdin:
    stack = []
    for s in line.split():
        if re.match('[-+]?\d+', s):
            stack.append(float(s))
        elif s == '+':
            n = stack.pop()
            stack[-1] += n
        elif s == '-':
            n = stack.pop()
            stack[-1] -= n
        elif s == '*':
            n = stack.pop()
            stack[-1] *= n
        elif s == '/':
            n = stack.pop()
            stack[-1] /= n
    print('{:.6f}'.format(stack[-1]))
x, y = int(input().split())
a = x-1
b = y-1
print(a*b)

### FIXED CODE ###

x,y = map(int, input().split())
print((x-1)*(y-1))
print("Yes" if (N[0]==N[1]==N[2])or(N[1]==N[2]==N[3]) else "No" )

### FIXED CODE ###

N=input()
answer="No"
for i in range(len(N)-2):
  if N[i]==N[i+1]:
    if N[i+1]==N[i+2]:
      answer="Yes"
print(answer)
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))
 
n, m, q = map(int, input().split())
vec = []
a = []
b = []
c = []
d = []
for _ in range(q):
    i, j, k, l = map(int, input().split())
    a.append(i - 1)
    b.append(j - 1)
    c.append(k)
    d.append(l)
it = a + b
it = list(set(it))
for i in range(1, m+1):
    for j in range(len(it)):
        vec.append(i)
na = []
nb = []
for i in range(q):
    for j in range(len(it)):
        if a[i] == it[j]:
            na.append(j)
        if b[i] == it[j]:
            nb.append(j)
ans = 0
for x in combinations(vec, len(it)):
    cnt = 0
    for i in range(q):
        if x[nb[i]] - x[na[i]] == c[i]:
            cnt += d[i]
    #print(x, cnt)
    if ans < cnt:
        ans = cnt
print(ans)
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations, combinations_with_replacement
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

n, m, q = map(int, input().split(' '))
a = []
b = []
c = []
d = []
for _ in range(q):
    i, j, k, l = map(int, input().split())
    a.append(i - 1)
    b.append(j - 1)
    c.append(k)
    d.append(l)
it = a + b
it = list(set(it))
na = []
nb = []
for i in range(q):
    for j in range(len(it)):
        if a[i] == it[j]:
            na.append(j)
        if b[i] == it[j]:
            nb.append(j)
ans = 0
for x in combinations_with_replacement(range(1, m+1), len(it)):
    cnt = 0
    for i in range(q):
        if x[nb[i]] - x[na[i]] == c[i]:
            cnt += d[i]
    #print(x, cnt)
    if ans < cnt:
        ans = cnt
print(ans)

### FIXED CODE ###

from itertools import combinations_with_replacement

n, m, q = map(int, input().split())
a = []
b = []
c = []
d = []
for _ in range(q):
    i, j, k, l = map(int, input().split())
    a.append(i - 1)
    b.append(j - 1)
    c.append(k)
    d.append(l)
it = a + b
it = list(set(it))
na = []
nb = []
for i in range(q):
    for j in range(len(it)):
        if a[i] == it[j]:
            na.append(j)
        if b[i] == it[j]:
            nb.append(j)
ans = 0
for x in combinations_with_replacement(range(1, m+1), len(it)):
    cnt = 0
    for i in range(q):
        if x[nb[i]] - x[na[i]] == c[i]:
            cnt += d[i]
    if ans < cnt:
        ans = cnt
print(ans)
import math
r = float(input())
print '%f %f' % (pi, pi)

### FIXED CODE ###

import math
r = float(input())
print '%f %f' % (math.pi*r*r, 2*math.pi*r)
import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())

N = int(input())
X = input()

def popcount(n):
    cnt = 0
    while n > 0:
        cnt += n & 1
        n //= 2
    return cnt
def f(n):
    cnt = 0
    while n != 0:
        n = n % popcount(n)
        cnt += 1
    return cnt

ones = X.count('1')
MOD1 = ones + 1
MOD2 = ones - 1
pow1 = [1] * (len(X) + 1)
pow2 = [0] * (len(X) + 1)
if MOD2 != 0:
    pow2[0] = 1
    for i in range(1, len(X) + 1):
        pow1[i] = (pow1[i - 1] * 2) % MOD1
        pow2[i] = (pow2[i - 1] * 2) % MOD2
else:
    for i in range(1, len(X) + 1):
        pow1[i] = (pow1[i - 1] * 2) % MOD1

X1, X2 = 0, 0
for i in range(N):
    if X[i] == '1':
        X1 += (2 * X1 + 1) % MOD1 
        X2 += (2 * X2 + 1) % MOD2
X1 %= MOD1
if MOD2 != 0:
    X2 %= MOD2

for i in range(N):
    d = N - i - 1
    if X[i] == '0':
        x = (X1 + pow1[d]) % MOD1
        print(f(x) + 1)
    else:
        if MOD2 != 0:
            x = (X2 - pow2[d]) % MOD2
            print(f(x) + 1)
        else:
            print(0)

### FIXED CODE ###

import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())

N = int(input())
X = input()

def popcount(n):
    cnt = 0
    while n > 0:
        cnt += n & 1
        n //= 2
    return cnt
def f(n):
    cnt = 0
    while n != 0:
        n = n % popcount(n)
        cnt += 1
    return cnt

ones = X.count('1')
MOD1 = ones + 1
MOD2 = ones - 1
pow1 = [1] * (len(X) + 1)
pow2 = [0] * (len(X) + 1)
if MOD2 != 0:
    pow1[0] = 1
    pow2[0] = 1
    for i in range(1, len(X) + 1):
        pow1[i] = (pow1[i - 1] * 2) % MOD1
        pow2[i] = (pow2[i - 1] * 2) % MOD2
else:
    for i in range(1, len(X) + 1):
        pow1[i] = (pow1[i - 1] * 2) % MOD1

X1 = 0
X2 = 0
for i in range(N):
    if X[i] == '1':
        X1 += pow1[N - i - 1]
        X2 += pow2[N - i - 1]
X1 %= MOD1
if MOD2 != 0:
    X2 %= MOD2

for i in range(N):
    d = N - i - 1
    if X[i] == '0':
        x = (X1 + pow1[d]) % MOD1
        print(f(x) + 1)
    else:
        if MOD2 != 0:
            x = (X2 - pow2[d]) % MOD2
            print(f(x) + 1)
        else:
            print(0)
A,B = map(int,input().split())
if A = B:
    print(1)
elif B = 1:
    print(0)
else
    print((B-1)//(A-1)+1)

### FIXED CODE ###

A,B = map(int,input().split())
if round((B-1)%(A-1)) == 0:
  print((B - 1)//(A - 1))
else:
  print((B-1)//(A-1)+1)
t = input()
t = list(t)

if t[1] == "?":
    if t[2] == "P":
        t[1] = "D"
    else:
        t[1] = "P"
        
for i in range(2, len(t)):
    if t[i] == "?":
        if t[i - 1] == "P":
            t[i] = "D"
        else:
            if t[i + 1] == "P":
                t[i] = "D"
            else:
                t[i] = "P"
                
ans = "".join(t)
print(ans)

### FIXED CODE ###

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