Harryxun/stf_run huggingface dataset:
S = input()
N = [chr(i) for i in range(97,123) if chr(i) not in S]

if len(S) == 26:
  if S == "zyxwvutsrqponmlkjihgfedcba":
    print(-1)
  else:
    LS = list(S)
    sLS = sorted(LS)
    for i in range(0,27):
      if LS[i] != sLS[i]:
        S = S[:i - 1] + sLS[i]
        break
else:
  S = S + N[0]
  print(S)



### FIXED CODE ###

S = input()

if len(S) < 26:
  N = [chr(i) for i in range(97,123) if chr(i) not in S]
  print(S + N[0])
else:
  for i in range(26):
    for j in range(i+1):
      if S[-(i + 1)] < S[-(j + 1)]:
          print(S[:-(i+1)]+S[-(j+1)])
          exit()
  else:
    print(-1)
K, S = map(str, input().split())
K = int(K)

if len(S) <= K:
    print(S)
else:
    S = S[0:K]+"..."
    print(S)

### FIXED CODE ###

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

if len(S) <= K:
    print(S)
else:
    S = S[0:K]+"..."
    print(S)
import sys
import math
from math import sqrt
from collections import deque
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)

h,w=map(int,input().split())
miti=[]
for i in range(h):
    miti.append(input())

queue=deque([])
def bfs(x,y):
    for i,j in [[x+1,y],[x,y+1],[x-1,y],[x,y-1]]:
        if i<0 or h<=i or j<0 or w<=j :continue
        if dist[i][j] != -1:continue
        if miti[i][j]=="#":continue
        dist[i][j]=dist[x][y]+1
        queue.append([i,j])
    while queue:
        t,r=queue.popleft()
        bfs(t,r)

for i in range(h):
  for j in range(w):
    if miti[i][j]==".":
      s=i;t=j
      break
  break
dist=[[-1 for i in range(w)] for j in range(h)]
dist[s][t]=0
bfs(s,t)


dis0=0
ty=[0,0]
for i in range(h):
    for j in range(w):
        if dis0<dist[i][j]:
            dis0=dist[i][j]
            ty=[i,j]
q,e=ty
dist=[[-1 for i in range(w)] for j in range(h)]
dist[q][e]=0
queue=deque([])
bfs(q,e)

ans=0

for i in range(h):
    for j in range(w):
        if ans<dist[i][j]:
            ans=dist[i][j]

print(ans)


### FIXED CODE ###

import sys
import math
from math import sqrt
from collections import deque
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)

h,w=map(int,input().split())
miti=[]
for i in range(h):
    miti.append(input())
    

def bfs(x,y):
    for i,j in [[x+1,y],[x,y+1],[x-1,y],[x,y-1]]:
        if i<0 or h<=i or j<0 or w<=j :continue
        if dist[i][j] != -1:continue
        if miti[i][j]=="#":continue
        dist[i][j]=dist[x][y]+1
        queue.append([i,j])
    while queue:
        t,r=queue.popleft()
        bfs(t,r)
ans=0
for i in range(h):
    for j in range(w):
        if miti[i][j]=="#":continue
        dist=[[-1 for i in range(w)] for j in range(h)]
        dist[i][j]=0
        queue=deque([])
        bfs(i,j)
        
        
        for s in range(h):
            for t in range(w):
                ans=max(ans,dist[s][t])
print(ans)
a= input()
print("Yes" if int(a) % (int(a[0])+int(a[1])) == 0 else "No")

### FIXED CODE ###

a= input()
print("Yes" if int(a) % sum([int(a[i]) for i in range(len(a))]) == 0 else "No")
import sys
si = sys.stdin.readline


def main():
    [n, k] = [int(e) for e in si().split()]
    trace = dict()
    for i in range(n):
        trace[i] = 0

    l = [int(e) for e in si().split()]
    i, cnt = 0, 0
    while True and k > 0:
        k -= 1
        cnt += 1
        i = l[i]-1
        if i == 0 or trace[i] != 0:
            cy = cnt-trace[i]
            break
        trace[i] = cnt
    k %= cy
    while k > 0:
        i = l[i]-1
        k -= 1
    print(i+1)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
si = sys.stdin.readline


def main():
    [n, k] = [int(e) for e in si().split()]
    trace = dict()
    for i in range(1, n+1):
        trace[i] = 0

    l = [int(e) for e in si().split()]
    i, cnt = 1, 0
    while k > 0:
        k -= 1
        cnt += 1
        i = l[i-1]
        if i == 1 or trace[i] != 0:
            cy = cnt-trace[i]
            k %= cy
            break
        trace[i] = cnt
    while k > 0:
        i = l[i-1]
        k -= 1
    print(i)


if __name__ == '__main__':
    main()
def solve():
    K = int(input())
    S = input()
    N = len(S)

    MOD = 10**9+7
    n = N+K
    fac = [1]*(n+1)
    rev = [1]*(n+1)
    
    for i in range(1,n+1):
    fac[i] = i*fac[i-1]%MOD
    rev[i] = pow(fac[i], MOD-2, MOD)
    
    comb = lambda a,b:(fac[a]*rev[a-b]*rev[b])%MOD

    ans = 0
    for i in range(K+1):
        ans += pow(26, K-i, MOD) * pow(25, i, MOD) * comb(N+i-1, i)
        ans %= MOD
    print(ans)


solve()


### FIXED CODE ###

MOD = 10**9+7
K = int(input())
S = input()
N = len(S)

n = N+K
fac = [1]*(n+1)
rev = [1]*(n+1)
 
for i in range(1,n+1):
  fac[i] = i*fac[i-1]%MOD
  rev[i] = pow(fac[i], MOD-2, MOD)
 
comb = lambda a,b:(fac[a]*rev[a-b]*rev[b])%MOD

ans = 0
for i in range(K+1):
    ans += pow(26, K-i, MOD) * pow(25, i, MOD) * comb(N+i-1, i)
    ans %= MOD
print(ans)
N = int(input())
X = list(map(int, input().split()))
 
s_X = sorted(X)
miX = s_X[N//2]
mi1X = s_X[N//2 + 1]
 
for a in X:
  if(a.find(s_X)<=N//2):
    print(mi1X)
  else:
    print(miX)

### FIXED CODE ###

# import copy

N = int(input())
X = list(map(int, input().split()))
# S_X = copy.copy(X)
S_X = sorted(X)
miX = S_X[N // 2 - 1]
mi1X = S_X[N // 2]
# print(S_X, X)
# print(miX, mi1X)

# print(miX, mi1X)
# print(X)
for a in X:
    if(a <= miX):
        print(mi1X)
    else:
        print(miX)
S = input()
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No"

### FIXED CODE ###

S = input()
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")
import heapq

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

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

ans = 0
for i in range(K+1):
    if i > 50:
        continue
    for j in range(i+1):
        tmp = 0
        q = V[:j] + V[N-i+j:]
        heapq.heapify(q)
        for _ in range(min(i, K-i)):
            tmp_min = heapq.heappop(q)
            ans = max(ans, sum(q))
            if tmp_min > 0:
                ans = max(ans, sum(q)+tmp_min)
                break

print(ans)

### FIXED CODE ###

import heapq

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

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

ans = 0
for i in range(1, K+1):
    if i > N:
        continue
    for j in range(i+1):
        tmp = 0
        q = V[:j] + V[N-i+j:]
        heapq.heapify(q)
        for _ in range(min(i, K-i)):
            tmp_min = heapq.heappop(q)
            ans = max(ans, sum(q))
            if tmp_min > 0:
                ans = max(ans, sum(q)+tmp_min)
                break
        ans = max(ans, sum(q))

print(ans)
from collections import defaultdict

n = int(input())
x, y = [0] * n, [0] * n
data = defaultdict(int)
for i in range(n):
    x[i], y[i] = map(int, input().split())

for i in range(n):
    for j in range(i + 1, n):
        data[x[j] - x[i], y[j] - y[i]] += 1

print(n - max(data.values()))

### FIXED CODE ###

from collections import defaultdict

n = int(input())
x, y = [0] * n, [0] * n
data = defaultdict(int)
for i in range(n):
    x[i], y[i] = map(int, input().split())

if n == 1:
    print(1)
    exit()
for i in range(n):
    for j in range(n):
        if i != j:
            data[x[j] - x[i], y[j] - y[i]] += 1

print(n - max(data.values()))
# -*- coding:utf-8 -*-
s = list(input())
k = int(input())
for tmp in range(len(s)):
    if k == 0:
        break
    a = 26-(ord(s[tmp]) - ord('a'))
    if k >= a:
        k -= a
        s[tmp] = 'a'
    else:
        pass
if k > 0:
    if ord('z') >= ord(s[len(s)-1])+k:
        s[len(s)-1] = chr(ord(s[len(s)-1])+k)
    else:
        s[len(s)-1] = chr((ord(s[len(s)-1])+k)-26)
print(''.join(s))

### FIXED CODE ###

# -*- coding:utf-8 -*-
s = list(input())
k = int(input())
for tmp in range(len(s)):
    if k == 0:
        break
    a = 26-(ord(s[tmp]) - ord('a'))
    if s[tmp] != 'a' and k >= a: 
        k -= a
        s[tmp] = 'a'
    else:
        pass
if k > 0:
    s[len(s)-1] = chr((ord(s[len(s)-1])+k%26))
print(''.join(s))
import sys
h,w=map(int,input().split())
s=[]
for num in range(h):
  s.append(list(map(int,input().split())))
if w==1 and h==1:
  if s[0]=='#':
    print('No')
    sys.exit()
if w==2 and h==1:
  if (s[0][0]=='.' and s[0][1]=='#') or (s[0][0]=='#' and s[0][1]=='.'):
    print('No')
    sys.exit()  
for i in range(h):
  for j in range(w-2):
    if s[i][j]=='.' and s[i][j+1]=='#' and s[i][j+2]=='.':
      if s[i][j+1]=='.':
        print('No')
        sys.exit()
    if s[i][0]=='#' and s[i][1]=='.':
      if s[min(h-1,i+1)][0]=='.':
        print('No')
        sys.exit()
    if s[i][w-2]=='.' and s[i][w-1]=='#':
      if s[min(h-1,i+1)][w-1]=='.':
        print('No')
        sys.exit()
print('Yes')
  


### FIXED CODE ###

h, w = map(int, input().split())

s = [input() for _ in range(h)]

ans = 'Yes'

for i in range(1, h-1):
    for j in range(1, w-1):
        if s[i][j] == '#' and s[i-1][j] == '.' and s[i+1][j] == '.' and s[i][j-1] == '.' and s[i][j+1] == '.':
            ans = 'No'

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

def burger(N):
  if N == 0:
    return 'P'
  else:
    subburger = burger(N-1)
    return 'B' + subburger + 'P' + subburger + 'B'
print(burger(N)[:X+1].count('P'))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000)

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

ans = 0
for n in range(N,-1,-1):
  if X > (2**(n+2) - 3) / 2 :
    ans += 2**n #- 1 + 1
    X = X - (2**(n+1) - 3) - 2
  else:
    X -= 1
print(ans)
N_str, K=input().split()
N_digit=list(map(int,list(N_str)))
D=sorted(list(map(int,input().split())))
l_digit=[n>D[-1] for n in N_digit]


if any(l_digit):
  N_n=l_digit.index(True)
  if not any([n<D[-1] for n in N_digit[0:N_n]]):
    out=list(str(D[1] if D[0]==0 else D[0]))
    out+=[str(D[0]) for i in range(len(N_digit))]
  else:
    out=[str(D[[n<=D[j] for j in range(int(K))].index(True)]) for n in N_digit[0:N_n]] + [str(D[0]) for n in N_digit[N_n:]]
    for k in range(N_n-1,-1,-1):
      if N_digit[k]<D[-1]:
        out[k]=str(D[[N_digit[k]<D[j] for j in range(int(K))].index(True)])
        break
    
else:
  out=[str(D[[n<=D[j] for j in range(int(K))].index(True)]) for n in N_digit]

print(int("".join(out)))



### FIXED CODE ###

N_str, K=input().split()
K=10-int(K)
N_digit=list(map(int,list(N_str)))
D=sorted(list(map(int,input().split())))
D=[d for d in range(10) if d not in D]

l_digit=[n>D[-1] for n in N_digit]

if any(l_digit):
  N_n=l_digit.index(True)
  if not any([n is not D[-1] for n in N_digit[0:N_n]]):
    out=list(str(D[1] if D[0]==0 else D[0]))
    out+=[str(D[0]) for i in range(len(N_digit))]
  else:
    flag=False
    out=[]
    for i in range(N_n):
      if not flag:
      	for j in range(K):
          if D[j]>=N_digit[i]:
            out.append(str(D[j]))
            if D[j]!=N_digit[i]:
              flag=True
              break
      else:
        out.append(str(D[0]))
    for i in range(N_n,len(N_digit)):
      out.append(str(D[0]))
else:
  out=[]
  flag=False
  for n in N_digit:
    if not flag:
      for j in range(K):
        if D[j]>=n:
          out.append(str(D[j]))
          if D[j]>n:
            flag=True
          break
    else:
      out.append(str(D[0]))
      
print(int("".join(out)))
N,M = map(int,input().split())

step = [0]*N

for i in range(M):
    a = int(input())
    step[a-1] = 1

mod = int(1e9+7)

dp = [0]*N

if not step[0] and not step[1]:
    dp[0] = 1
    dp[1] = 2
elif step[0] and not step[1]:
    dp[0] = 0
    dp[1] = 1
elif not step[0] and step[1]:
    dp[0] = 1
    dp[1] = 0
else:
    print(0)
    exit()

for i in range(2,N):
    if step[i]:
        continue
    else:
        dp[i] = (dp[i-1] + dp[i-2])%mod
    
print(dp[-1])

### FIXED CODE ###

N,M = map(int,input().split())
a = [1]*N
for i in range(M):
    a[int(input())-1] = 0

mod = int(1e9+7)

dp = [0]*N

if N == 1:
    print(1)
    exit()

if a[0] and a[1]:
    dp[0] = 1
    dp[1] = 2
elif not a[0] and a[1]:
    dp[1] = 1

for i in range(2,N):
    if a[i]:
        dp[i] = dp[i-1] + dp[i-2]
    else:
        dp[i] = 0

print(dp[N-1]%mod)
import sys
sys.setrecursionlimit(max(1000, n))
# 小さすぎても怒られるので

from collections import defaultdict
n = int(input())
cs = [0] + [int(c) for c in input().split()]
ns = defaultdict(set)
for _ in range(n-1):
    a,b = [int(c) for c in input().split()]
    ns[a].add(b)
    ns[b].add(a)

toru = [0] * (n+1)
def dfs(ns, prev, now, toru):
    end = defaultdict(int)
    k = cs[now]
    end[k] = 1
    s = 1 # nowで終わるパスの種類
    for u in ns[now]:
        if u==prev:
            continue
        tmp_end, tmp_toru, tmp_s = dfs(ns, now, u, toru)
        # toruの更新
        for kk, vv in tmp_end.items():
            if kk not in end:
                toru[kk] += vv * s
            else:
                toru[kk] += vv * s + end[kk] * (tmp_s+1) - ((vv+1) * end[kk])
        for kk, vv in end.items():
            if kk not in tmp_end:
                toru[kk] += vv * tmp_s
        # end, sの更新
        end[k] += tmp_s
        for kk,vv in tmp_end.items():
            if k!=kk:
                end[kk] += tmp_end[kk]
        s += tmp_s
    toru[k] += 1
#     print(now, prev, end, toru, s)
    return end, toru, s
end, toru, s = dfs(ns, prev=-1, now=1, toru=toru)

for item in toru[1:]:
    print(item)

### FIXED CODE ###


import sys
# 小さすぎても怒られるので
from collections import defaultdict
n = int(input())
sys.setrecursionlimit(max(1000, 2*n))

cs = [0] + [int(c) for c in input().split()]
ns = defaultdict(set)
for _ in range(n-1):
    a,b = [int(c) for c in input().split()]
    ns[a].add(b)
    ns[b].add(a)

ans = [0] * (n+1) # kを通らないパスの総数
minus = [0] * (n+1) # uの部分木のうち
minus0 = defaultdict(int)
st = {k: [] for k in range(1, n+1)}
nextu = {}
def dfs(u, prev, ans):
    global minus, st, minus0
    k = cs[u]
    st[k].append(u)
    ss = 1
    for v in ns[u]:
        if v==prev:
            continue
        nextu[u] = v
        s = dfs(v, u, ans)
        ss += s
        tmp = s - minus[v]
        ans[k] += (int(tmp * (tmp - 1) / 2) + tmp)
    st[k].pop()
    if st[k]:
        minus[nextu[st[k][-1]]] += ss
    else:
        minus0[k] += ss
#     print(ss)
    return ss

dfs(1, -1, ans)
for k in range(1, n+1):
    tmp = n - minus0[k]
    ans[k] += (int(tmp * (tmp - 1) / 2) + tmp)
    
total = int(n * (n+1) / 2)
for i in range(1, n+1):
    print(total - ans[i])
N = int(input())
happiness = []

for n in range(N):
    num = input().split()
    a = int(num[0])
    b = int(num[1])
    happiness.append([a + b, a, b])

happiness.reverse()

sum = 0
turn = 0

for n in range(N):
    if turn == 0:
        sum += happiness[n][1]
    else:
        sum -= happiness[n][2]
    turn ^= 1

print(sum)

### FIXED CODE ###

line = input().split()
N = int(line[0])
A = int(line[1])
B = int(line[2])
print(min(A, B), max(A + B - N, 0))
import math
n = int(input())
s = [['n' for i in range(10)] for j in range(n)]
for i in range(n):
    s[i]=list(input())
    s[i].sort()
j=0
tans=1
ans=0
donei=[]
for i in range(n):
    if not i in donei:
        j=n-1
        while j>i:
            if s[i]==s[j]:
                tans = tans + 1
                donei.append(j)
            j=j-1
        ans = ans + int(math.factorial(tans)/2)
        tans=1

print(ans)


### FIXED CODE ###

n = int(input())
s = []
for i in range(n):
    s.append(''.join(sorted(input())))
s.sort()
ans = 0
t = 0
for i in range(1,n):
    if s[i-1]==s[i]:
        t += 1
        if i==n-1:
            ans += t*(t+1)/2
    else:
        if t>0:
            ans += t*(t+1)/2
            t = 0

print(int(ans))
X,Y=list(map(int,input().split()))

import sys
if (2*Y-X)%3!=0 or (2*X-Y)%3!=0:
  print(0)
  sys.exit()
  
x=(2*Y-X)//3
y=(2*X-Y)//3
#(x+y)Cxを求める
fac=[0 for i in range(x+y+1)]
inv=[0 for i in range(x+y+1)]
finv=[0 for i in range(x+y+1)]
#初期条件
p=1000000007
fac[0]=fac[1]=1
inv[1]=1
finv[1]=1
#テーブルの作成
for i in range(2,x+y+1):
  fac[i]=fac[i-1]*i%p
  #p=(p//a)*a+(p%a) a^(-1)=-(p//a)*(p%a)^(-1)
  inv[i]=(p-(p//i)*inv[p%i])%p
  finv[i]=finv[i-1]*inv[i]%p
#求める
print(fac[x+y]*finv[x]*finv[y]%p)




### FIXED CODE ###

X,Y=list(map(int,input().split()))

import sys
if (2*Y-X)%3!=0 or (2*X-Y)%3!=0:
  print(0)
  sys.exit()
if (2*Y-X)<0 or (2*X-Y)<0:
  print(0)
  sys.exit()
x=(2*Y-X)//3
y=(2*X-Y)//3
#(x+y)Cxを求める
fac=[0 for i in range(x+y+1)]
inv=[0 for i in range(x+y+1)]
finv=[0 for i in range(x+y+1)]
#初期条件
p=1000000007
fac[0]=fac[1]=1
inv[1]=1
finv[0]=finv[1]=1
#テーブルの作成
for i in range(2,x+y+1):
  fac[i]=fac[i-1]*i%p
  #p=(p//a)*a+(p%a) a^(-1)=-(p//a)*(p%a)^(-1)
  inv[i]=(-(p//i)*inv[p%i])%p
  finv[i]=finv[i-1]*inv[i]%p
#求める

print((fac[x+y]*finv[x]%p)*finv[y]%p)
n, m = map(int,input().split())

l = [[0 for _ in range(2)] for _ in range(n)]

print(l)
f = 0
con = ""

for i in range(n):
    s, c = (list(map(int,input().split())))
    if l[s-1][1] == 0 or l[s-1][0] == c:
        if s == 1 and c == 0:
            f = 1
            break
        l[s-1][0] = c
        l[s-1][1] = 1
    else:
        f = 1
        break
else:
    for j in range(n):
        if l[j][0] != 0:
            break
        else:
            f = 1
            break

if f:
    print(-1)
else:
    for i in range(n):
        con += str(l[i][0])
    print(int(con))

### FIXED CODE ###

# n = int(input())
n, m = map(int,input().split())
# l = [[0 for _ in range(n)] for _ in range(n)]
l = []
f = 0

for i in range(m):
    l.append(list(map(int,input().split())))

# print(l)

for i in range(1000):
    si = str(i)
    if len(si) == n:
        for j in range(m):
            # print(si, l)
            if si[l[j][0]-1] == str(l[j][1]):
                # print('OK')
                f = 0
            else:
                f = 1
                break
    else:
        continue
    if f == 0:
        print(si)
        exit()

print(-1)
N, K = map(int, input().split())

if N < K:
    print(N)
elif N % K == 0:
    print(0)
else:
    a = N % K
    if a<k:
      print(a)
    else:
      print(k)
      

### FIXED CODE ###

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

a = N % K
b = abs(a-K)
if a<b:
    print(a)
else:
    print(b)
class Combination:
    def __init__(self, size, mod=10**9 + 7):
        self.size = size + 2
        self.mod = mod
        self.fact = [1, 1] + [0] * size
        self.factInv = [1, 1] + [0] * size
        self.inv = [0, 1] + [0] * size

        for i in range(2, self.size):
            self.fact[i] = self.fact[i - 1] * i % self.mod
            self.inv[i] = -self.inv[self.mod % i] * (self.mod // i) % self.mod
            self.factInv[i] = self.factInv[i - 1] * self.inv[i] % self.mod

    def npr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * self.factInv[n - r] % self.mod

    def ncr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * (self.factInv[r] * self.factInv[n - r] % self.mod) % self.mod

    def factN(self, n):
        if n < 0:
            return 0
        return self.fact[n]

    def f(self, p, q):
        return self.fact[p + q] * self.factInv[p] * self.factInv[q] % MOD


X, Y = map(int, input().split())
MOD = 10**9 + 7

if (X + Y) % 3 != 0:
    print(0)
    exit()

time = (X + Y) // 3
ans = 0
comb = Combination(time + 10)

x = (2 * X - Y) // 3
y = time - x

print(comb.f(x, y) % MOD)


### FIXED CODE ###

class Combination:
    def __init__(self, size, mod=10**9 + 7):
        self.size = size + 2
        self.mod = mod
        self.fact = [1, 1] + [0] * size
        self.factInv = [1, 1] + [0] * size
        self.inv = [0, 1] + [0] * size

        for i in range(2, self.size):
            self.fact[i] = self.fact[i - 1] * i % self.mod
            self.inv[i] = -self.inv[self.mod % i] * (self.mod // i) % self.mod
            self.factInv[i] = self.factInv[i - 1] * self.inv[i] % self.mod

    def npr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * self.factInv[n - r] % self.mod

    def ncr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * (self.factInv[r] * self.factInv[n - r] % self.mod) % self.mod

    def factN(self, n):
        if n < 0:
            return 0
        return self.fact[n]

    def f(self, p, q):
        return self.fact[p + q] * self.factInv[p] * self.factInv[q] % MOD


X, Y = map(int, input().split())
MOD = 10**9 + 7

if (X + Y) % 3 != 0:
    print(0)
    exit()

time = (X + Y) // 3
ans = 0
comb = Combination(time + 10)

for y in range(time + 1):
    x = time - y

    if X == x * 2 + y and Y == y * 2 + x:
        ans += comb.f(x, y)
        ans %= MOD

print(ans % MOD)
N, K = [int(x) for x in input().split(' ')]
m = 10**9 + 7
import math
def combination(n, r):
  return math.factorial(n) // (math.factorial(n-r) * math.factorial(r))
  
for k in range(1, K+1):
  print(combination(N-K+1, k) % m * combination(K-1, k-1))


### FIXED CODE ###

N, K = [int(x) for x in input().split(' ')]
m = 10**9 + 7
fact = [1] * (N+1)
for i in range(1, N+1):
  fact[i] = fact[i-1] * i
  
def combination(n, r):
  return fact[n] // fact[r] // fact[n-r]
  
for k in range(1, K+1):
  print(combination(N-K+1, k) % m * combination(K-1, k-1) % m)
def solve():
    n,m=map(int,input().split()[0:2])

    fa=list(range(0,n+1))
    sz=[1]*(n+1)
    def gf(x) :
        if x==fa[x] :
            return x
        fa[x]=gf(fa[x])
        return fa[x]

    for i in range(m) :
        a,b=map(gf,map(int,input().split()[0:2]))
        if a!=b :
            fa[a]=b
            sz[b]+=sz[a]

    ans=1
    for i in range(1,n+1) :
        ans=max(ans,sz[gf(i)])
    return ans

print(solve())


### FIXED CODE ###


import sys
sys.setrecursionlimit(int(2e5+999))

def solve():
    n,m=map(int,input().split()[0:2])

    fa=list(range(0,n+1))
    sz=[1]*(n+1)
    def gf(x) :
        if x==fa[x] :
            return x
        fa[x]=gf(fa[x])
        return fa[x]

    for i in range(m) :
        a,b=map(gf,map(int,input().split()[0:2]))
        if a!=b :
            fa[a]=b
            sz[b]+=sz[a]

    ans=1
    for i in range(1,n+1) :
        ans=max(ans,sz[gf(i)])
    return ans

print(solve())
t = list(input())

if t[0] == '?' and t[1] == 'D':
    t[0] = 'P'
elif t[0] == '?' and t[1] == 'P':
    t[0] = 'D'
elif t[0] == '?' and t[1] == '?':
    t[0] = 'P'

for i in range(len(t)):
    if t[i] == '?' and t[i-1] =='P':
        t[i] = 'D'
    elif t[i] == '?' and t[i-1] =='D':
        t[i] = 'P'



print(''.join(t))

### FIXED CODE ###

t = input()

print(t.replace('?', 'D'))
li = list(input())
flag = False
for i in range(li):
  if i == 0:
    continue
  flag = li[i-1] == li[i]
  if flag:
    break
print("Bad" if flag else "Good")

### FIXED CODE ###

li = list(input())
flag = False
for i in range(len(li)):
  if i == 0:
    continue
  flag = li[i-1] == li[i]
  if flag:
    break
print("Bad" if flag else "Good")
a, b. c = map(int, input().split())
i = a
j = 0
if(a <= i and i <= b) :
  if(c % i == 0) :
    j += 0
  else :
    pass
else :
  print(j)



### FIXED CODE ###

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

for i in range(a, b + 1) :
    if c % i == 0 :
        s += 1
        
print(s)
a,b,k = map(int,input().split())
inte = []
if k >= (b-a+1) // 2:
  k = (b-a+1) // 2
for i in range(a,a+k):
  inte.append(i)
for i in range(b-k+1,b+1):
  inte.append(i)
for i in range(len(set(inte))):
  print(list(set(inte))[i])
  


### FIXED CODE ###

s = list(input())
if len(set(s)) == 3:
  print("Yes")
else:
  print("No")
a,b,c=map(map(int,input().split()))
s=set(a,b,c)
if len(s)==2:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a,b,c=map(int,input().split())
s=set([a,b,c])
if len(s)==2:
  print("Yes")
else:
  print("No")
a = int(input("Input an integer : "))
n1 = int( "%s" % a )
n2 = int( "%s%s" % (a,a) )
n3 = int( "%s%s%s" % (a,a,a) )
print (n1+n2+n3

### FIXED CODE ###

a = int(input())
n1 = int(pow(a,1))
n2 = int(pow(a,2))
n3 = int(pow(a,3))
print (n1+n2+n3)
s=input()
n=len(s)
if n%2!=0:
    lista=[]
    s1=s[0,(n-1)//2]
    s2=s[(n+1)//2,n]
    s3=s2[::-1]
    for p in range((n-1)//2):
        if s1[p]!=s3[p]:
            lista.append(p)
    print(len(lista))
else:
    s4=s[0:n//2]
    s5=[n//2:n]
    s6=s5[::-1]
    for q in range(n//2):
        if s4[q]!=s6[q]:
            listb.append(q)
    print(len(listb))
        
   

### FIXED CODE ###

s=input()
n=len(s)
cnt=0
if n%2==0:
  for i in range(n//2):
    if s[:n//2][::-1][i]!=s[n//2:n][i]:
      cnt+=1
  print(cnt)
else:
  for i in range(n//2):
    if s[:(n-1)//2][::-1][i]!=s[(n+1)//2:n][i]:
      cnt+=1
  print(cnt)
def aaa(x):
    x = x ** 3

print aaa(x)

### FIXED CODE ###

x = input()
print(pow(int(x),3))