Harryxun/stf_run huggingface dataset:
def main():
    *S, = input()
    count = 0
    max = 0
    for i in S:
        if i == "A" or i == "C" or i == "G" or i == "T":
            count += 1
        else:
            if max < count:
                max = count
            count = 0
    print(max(count, max))
main()

### FIXED CODE ###

def main():
    *S, = input()
    count = 0
    maximum = 0
    for i in S:
        if i == "A" or i == "C" or i == "G" or i == "T":
            count += 1
        else:
            if maximum < count:
                maximum = count
            count = 0
    print(max(count, maximum))
main()
from collections import Counter
n, k = map(int, input().split())
a_list = list(map(int, input().split()))
b = Counter(a_list)
b_list = sorted(b.items(), key=lambda x:x[1])[:k]
for i in b_list.values():
    d = sum(i)
print(n-d)

### FIXED CODE ###

import collections
n, k = map(int, input().split())
a_list = list(map(int, input().split()))
b = collections.Counter(a_list)
d = b.most_common()[k:]
sum = 0
for i in d:
    sum += i[1]
print(sum)
import math
n, m = map(int, input().split())
if m%2 == 0:
    divisor = [2, m//2]
else:
    divisor = []
for i in range(3, int(math.sqrt(m))+1):
    if m%i == 0:
        divisor.append(i)
        divisor.append(m//i)
divisor = sorted(divisor, reverse=True)
a = m//n
for i in divisor:
    if i > a:
        continue
    if (m-(m//i*i))%i == 0:
        break
print(i)

### FIXED CODE ###

import math
n, m = map(int, input().split())
if m%2 == 0:
    divisor = [1, 2, m//2, m]
else:
    divisor = [1, m]
for i in range(3, int(math.sqrt(m))+1):
    if m%i == 0:
        divisor.append(i)
        divisor.append(m//i)
divisor = sorted(divisor, reverse=True)
a = m//n
for i in divisor:
    if i > a:
        continue
    if (m-(m//i*i))%i == 0:
        break
print(i)
n = input()
n[3] = '8'
print(n)

### FIXED CODE ###

s = input()
print(s[:3]+'8'+s[4:])
n,m=map(input,int().split())
if(n>m):
  print("safe")
else:
  print("unsafe")

### FIXED CODE ###

n,m=map(int,input().split())
if(n>m):
  print("safe")
else:
  print("unsafe")
#H, W, A, B = [int(input()) for _ in range(4)]
MOD = 10**9 + 7
f = [1]
a = [1]
for i in range(1, H+W-1):
    f.append((f[i-1] * i) % MOD)
    a.append(pow(f[i], MOD-2, MOD))
ans = 0
for i in range(B, W, 1):
    ans += (((f[(H-A-1)+i] * a[H-A-1] * a[i]) % MOD) * ((f[(A-1)+(W-1-i)] * a[A-1] * a[W-1-i]) % MOD))
    ans %= MOD
print(ans)

### FIXED CODE ###

import scipy.misc as scm

H, W, A, B = [int(i) for i in input().split()]
MOD = 10**9 + 7
f = [1]
a = [1]
for i in range(1, H+W-1):
    f.append((f[i-1] * i) % MOD)
    a.append(pow(f[i], MOD-2, MOD))
ans = 0
for i in range(B, W, 1):
    ans += (((f[(H-A-1)+i] * a[H-A-1] * a[i]) % MOD) * ((f[(A-1)+(W-1-i)] * a[A-1] * a[W-1-i]) % MOD))
    ans %= MOD
print(ans)
#https://qiita.com/vain0x/items/fbde8b66927b84080811
#http://kmjp.hatenablog.jp/entry/2019/09/01/1000
#2人の選手が互いに相手を次の対戦相手に指定しているとき以外組めない
#したがって貪欲で一意
from collections import deque
import sys

n = int(input())
a = []

for i in range(n):
    ai = list(map(int, input().split( )))
    ai.reverse()
    for j in range(n-1):
        ai[j]-=1
    a.append(ai)

Q = deque()
for i in range(n):
    Q.append(i)

#nは番兵
Q.append(n)
Done = set()
cnt = 1
while len(Q)>1:
    i = Q.popleft()
    if i==n:
        cnt += 1
        Q.append(n)
        Done=set()###
    if i<n and a[i]:
        p = a[i].pop()
        if p not in Done:##この判定しないと1日に複数回試合することになる
            if a[p][-1]==i and i not in Done:###
                Q.append(i)
                Q.append(p)
                a[p].pop()
                Done.add(p)###
                Done.add(i)
            else:#戻す
                a[i].append(p)
        else:
            Done.remove(p)
        
for i in range(n):
    if len(a[i])>0:
        print(-1)
        sys.exit()
        
print(cnt)
        
        
        


### FIXED CODE ###

#https://qiita.com/vain0x/items/fbde8b66927b84080811
#http://kmjp.hatenablog.jp/entry/2019/09/01/1000
#2人の選手が互いに相手を次の対戦相手に指定しているとき以外組めない
#したがって貪欲で一意

n = int(input())
a = []

for i in range(n):
    ai = list(map(int, input().split( )))
    ai.reverse()
    for j in range(n-1):
        ai[j]-=1
    a.append(ai)

##キューの管理のどこがおかしいかわからなかったがあきらめる

can={i for i in range(n)}
nxt=set()
cnt = 0
rem=n*(n-1)//2
while rem:
    cnt+=1
    for i in can:
        if i not in nxt and a[i]:
            p = a[i][-1]
            if p not in nxt:##この判定しないと1日に複数回試合することになる
                if a[p][-1]==i:
                    a[p].pop();a[i].pop()
                    nxt.add(i);nxt.add(p)
    rem-=len(nxt)//2

    can=nxt.copy()###copy
    nxt=set()
    if not can:
        break
       
if rem:
    print(-1)
else:       
    print(cnt)
import collections
n = int(input())
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
ans = 1
a = (prime_factorize(n))
b = collections.Counter(prime_factorize(n-1))
for i in b.values():
    ans *= (i+1)
for i in range(len(a)):
    for j in range(i):
        if a[i]%a[j] == 1:
            ans += 1
            a[i] //= a[j]
print(ans)

### FIXED CODE ###

n = int(input())
div = []
div2 = []
ans = 0
for i in range(1,10**6+1):
    if n%i == 0:
        div+=[i,n//i]
    if (n-1)%i == 0:
        div2+=[i,(n-1)//i]
div = set(div)
div2 = set(div2)
# print(div)
a = [1]
for i in div:
    if i > 1:    
        t = n
        while t:
            if t%i == 0:
                t = t//i
            else:
                if t%i == 1:
                    ans += 1
                    a += [i]
                break
# for i in div2:
#     if i > 1:    
#         t = n-1
#         while t:
#             if t == 1:
#                 ans += 1
#                 a += [i]
#             t //= i
#         # if n%(i-1) == 1:
#         #     ans += 1
#         #     a += [i-1]
# print(ans)
# print(a)
# print(div)
# print(div2)
for i in div2:
    a+=[i]
a = set(a)
# print(a)
print(len(a)-1)
from collections import defaultdict

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

def sieve_of_eratosthenes_max(n):
    sieve = [0] * (n+1)
    sieve[0] = 1 #素数でない
    sieve[1] = 1 #素数でない
    for i in range(2, n):
        if sieve[i] == 0:
            for j in range(n // i + 1):
                sieve[i * j] = i
    return sieve

def factorize_by_sieve_of_eratosthenes(x, sieve):
    factor = defaultdict(int)
    while sieve[x] != x:
        factor[sieve[x]] += 1
        x //= sieve[x]
    factor[x] += 1
    return factor

n = int(input())
a_list = list(map(int, input().split()))
a_list.sort()

sieve = sieve_of_eratosthenes(a_list[-1])
pairwise = True
setwise = True
primes = set()
x = a_list[0]
for a in a_list:
    x = gcd(x, a)
    if pairwise and a != 1:
        factor = set(factorize_by_sieve_of_eratosthenes(a, sieve).keys())
        if not primes.isdisjoint(factor):
            pairwise = False
        else:
            primes |= factor

if pairwise:
    print("pairwise coprime")
elif x == 1:
    print("setwise coprime")
else:
    print("not coprime")




### FIXED CODE ###

from collections import defaultdict

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

def sieve_of_eratosthenes(n):
    sieve = [0] * (n+1)
    sieve[0] = 1 #素数でない
    sieve[1] = 1 #素数でない
    for i in range(2, n):
        if sieve[i] == 0:
            for j in range(2, n // i + 1):
                sieve[i * j] = i
    return sieve

def factorize_by_sieve_of_eratosthenes(x, sieve):
    factor = defaultdict(int)
    while sieve[x]:
        factor[sieve[x]] += 1
        x //= sieve[x]
    factor[x] += 1
    return factor

n = int(input())
a_list = list(map(int, input().split()))
a_list.sort()

sieve = sieve_of_eratosthenes(a_list[-1])
pairwise = True
setwise = True
primes = set()
x = a_list[0]
for a in a_list:
    x = gcd(x, a)
    if pairwise and a != 1:
        factor = set(factorize_by_sieve_of_eratosthenes(a, sieve).keys())
        if not primes.isdisjoint(factor):
            pairwise = False
        else:
            primes |= factor

if pairwise:
    print("pairwise coprime")
elif x == 1:
    print("setwise coprime")
else:
    print("not coprime")
n = int(input())
p = list(map(int, input().split( )))
ans = 0
tmp = 0
for i in range(n):
    if tmp>=a[i]:
        tmp = a[i]
        ans += 1
    tmp = max(a[i],tmp)
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split( )))
ans = 0
tmp = a[0]
for i in range(n):
    if tmp>=a[i]:
        tmp = a[i]
        ans += 1
    tmp = min(a[i],tmp)
print(ans)
n=int(input())
i=1
a=0
m=n
while n-26**i>0:
    n=n-26**i
    i+=1
    a+=n**i #桁数
a #最小
ans=""
b=0
l=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for j in range(i):
    b=m%26
    m=m//26
    if b==0:
      m=m-1
    ans=l[b-1]+ans
print(ans)

### FIXED CODE ###

s=input()
if s.isupper()==True:
    print("A")
else:
    print("a")
a,b,c = map(int,input().split())
if (a == b and a == c) or (a != b and a != c and b != c):
    print('No')
else:
    print('Yes')
~                   

### FIXED CODE ###

a,b,c = map(int,input().split())
if (a == b and a == c) or (a != b and a != c and b != c):
    print('No')
else:
    print('Yes')
N=input()

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

Wa=0
S=0
for i in range(N):
    Wa+=W[i]


for i in range(N):
    S+=W[i]
    if S>Wa/2:
        S1=S-W[i-1]
        S2=S

ans=abs(S1-S2)

print(ans)

### FIXED CODE ###

N=input()
N=int(N)

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

Wa=0
S=0
for i in range(N):
    Wa+=W[i]

#print(Wa)
for i in range(N):
    S+=W[i]
    if S>Wa/2:
        S1=S
        S2=Wa-S1
        S11=S-W[i]
        S22=Wa-S11
        break

ans1=abs(S1-S2)
ans2=abs(S11-S22)

#print(ans1,ans2,S1,S2,S11,S22)

if ans1>=ans2:
    print(ans2)
else:
    print(ans1)
import sys
a,b = sys.stdin.split(' ')
a, b = int(a),int(b)
print '%d %d' %(a*b, 2*(a+b))

### FIXED CODE ###

import sys
for x in sys.stdin:
    a,b=x.split(' ')
    a,b=int(a),int(b)
    print '%d %d' %(a*b, 2*(a+b))
H, W, K = map(int, input().split())
S = []
for _ in range(H):
    S.append(input().split())

T = []
back_n = -1
count = 1
la = []
for i in range(H):
    if "#" in S[i][0]:
        a = []
        c = 0
        if back_n == 0:
            for j in range(W):
                if S[i][0][j] == "#":
                    c += 1
                if S[i][0][j] == "#" and c >= 2:
                    count += 1

                a.append(count)
            if back_n == -1:
                T.append(a)
            else:
                for k in range(i - back_n + 1):
                    T.append(a)
            back_n = 0
            la = a
            count += 1
        else:
            for j in range(W):
                if S[i][0][j] == "#":
                    c += 1
                if S[i][0][j] == "#" and c >= 2:
                    count += 1

                a.append(count)

            if back_n == -1:
                T.append(a)
            else:
                for k in range(i - back_n + 1):
                    T.append(a)
            back_n = 0
            la = a
            count += 1

    else:
        back_n = i

for k in range(H - len(T) - 1):
    T.append(la)

for i in range(H):
    for j in range(W):
        print(T[i][j], end=" ")
    print(end="\n")


### FIXED CODE ###

H, W, K = map(int, input().split())
S = []
for _ in range(H):
    S.append(input().split())

T = []
back_n = -1
count = 1
la = []
for i in range(H):
    if "#" in S[i][0]:
        a = []
        c = 0
        if back_n == 0:
            for j in range(W):
                if S[i][0][j] == "#":
                    c += 1
                if S[i][0][j] == "#" and c >= 2:
                    count += 1

                a.append(count)
            if back_n == -1:
                T.append(a)
            else:
                for k in range(i - back_n + 1):
                    T.append(a)
            back_n = -1
            la = a
            count += 1
        else:
            for j in range(W):
                if S[i][0][j] == "#":
                    c += 1
                if S[i][0][j] == "#" and c >= 2:
                    count += 1

                a.append(count)

            if back_n == -1:
                T.append(a)
            else:
                for k in range(i - back_n + 1):
                    T.append(a)
            back_n = -1
            la = a
            count += 1

    elif back_n == -1 and not ("#" in S[i][0]):
        back_n = i

for k in range(H - len(T)):
    T.append(la)

for i in range(H):
    for j in range(W):
        print(T[i][j], end=" ")
    print(end="\n")
# coding: utf-8
N = int(input())
A = []
for _ in range(N):
    A.append(int(input()))
A.sort()
L = []
if A[N//2] < A[N//2+1]:
    flag = True
else:
    flag = False
for i in range(N//2):
    if flag:
        L.append(A[N//2-1-i])
        L.append(A[-1-i])
    else:
        L.append(A[-1-i])
        L.append(A[N//2-1-i])
ans = 0
if N % 2 == 1:
    L.append(A[N//2])
for i in range(N-1):
    ans += abs(L[i] - L[i+1])
print(ans)

### FIXED CODE ###

# coding: utf-8
N = int(input())
A = []
for _ in range(N):
    A.append(int(input()))
A.sort()
L1, L2 = [0] * N, [0] * N
L1[0] = A[N//2]
L2[0] = A[N//2]
for i in range(1, N):
    if i % 2 == 0:
        L1[i] = A[i//2-1]
        L2[i] = A[-i//2]
    else:
        L1[i] = A[-i//2]
        L2[i] = A[i//2]
a1, a2 = 0, 0
for i in range(N-1):
    a1 += abs(L1[i] - L1[i+1])
    a2 += abs(L2[i] - L2[i+1])
print(max(a1, a2))
N = int(input())
S = input()
count = 0
for i in range(N):
  if S[i] == 'A':
    if S[i+1] == 'B':
      if S[i+2] == 'C':
        count += 1
print(count)

### FIXED CODE ###

N = int(input())
S = input()
count = 0
if N == 3:
  if S == 'ABC':
    count = 1
elif N > 3:
	for i in range(N-2):
		if S[i] == 'A':
			if S[i+1] == 'B':
				if S[i+2] == 'C':
					count += 1
print(count)
n,k = map(int,input().split())
p = list(map(int,input().split()))
p.sort()
ans = 0
for i in range(K):
  ans += p[i]
print(ans)

### FIXED CODE ###

n,k = map(int,input().split())
p = list(map(int,input().split()))
p.sort()
print(sum(p[0:k]))
def func(n,k):
    A = []
    ans = 0
    for i in range(n):
        A.append(int(input()))
    for i in range(k-1):
        SUM += A[i]
    for i in range(k,len(a)):
        ans = max(ans,SUM+a[i]-a[i-k])
    print(ans)

for i in range(100):
    n,k = [int(s) for s in input().split()]
    if n == 0 and k ==0:
        break
    else:
        func(n,k)


### FIXED CODE ###

def func(n,k):
    SUM = 0
    ans = 0
    A = [int(input()) for _ in range(n)]
    for i in range(k):
        SUM += A[i]
    for i in range(k,len(A)):
        ans = max(ans,SUM+A[i]-A[i-k])
        SUM = SUM+A[i]-A[i-k]
    print(ans)

for _ in range(10):
    n,k = [int(s) for s in input().split()]
    if n == 0 and k ==0:
        break
    else:
        func(n,k)
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0

for j in range(N):

  if a[j]%2 == 1:
    one += 1
  elif a[j]%4 == 0:
    four += 1
  else :
    two +=1

  
if one =< four:
  print('Yes')
else :
  if two == 0 and four == one -1:
     print('Yes')
  else:
     print('No')

### FIXED CODE ###

N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0

for j in range(N):

  if a[j]%2 == 1:
    one += 1
  elif a[j]%4 == 0:
    four += 1
  else :
    two +=1

print("Yes" if four >= one or (four == one - 1 and two == 0) else "No")
# -*- coding: utf-8 -*-
from itertools import product
from heapq import heappop, heappush
import numpy as np


def small_dp(N,k,X):
    if k == 0:
        return N
    if k == 1:
        return X[0][1](N//X[0][0]) + N%X[0][0]
    if k == 2:
        c = 0
        for i in range(N//X[0][0]+1):
            j = (N-i*X[0][0])//X[1][0]
            c = max(X[0][0]*i + X[1][0]*j + (N-i*X[0][0])%X[1][0], c)
        return c
    if k == 3:
        dp = np.zeros((3, N+1), dtype=int)
        dp[0] = np.max((X[0][1]*np.repeat(np.arange(N//X[0][0]+1), X[0][0])[:N+1]+np.tile(np.arange(X[0][0]),N//X[0][0]+1)[:N+1], np.arange(N+1)), axis=0)
        for i,w in product(range(1,3), range(1,N+1)):
            dp[i,w] = np.max((dp[i-1,w::-1] + X[i][1]*np.repeat(np.arange(w//X[i][0]+1), X[i][0])[:w+1]))
        N = dp[-1][N]
        return N

def solve():
    N = int(input())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    
    for C in ((A,B), (B,A)):
        *X, = filter(lambda c: int.__sub__(*c)<0, zip(*C))
        N = small_dp(N, len(X), X)
    res = N

    return str(res)

if __name__ == '__main__':
    print(solve())

### FIXED CODE ###

# -*- coding: utf-8 -*-
from itertools import product
from heapq import heappop, heappush

def small_dp(N,A,B):
    *X, = filter(lambda c: int.__sub__(*c)<0, zip(A,B))
    k = len(X)
    if k == 0:
        return N
    if k == 1:
        return X[0][1]*(N//X[0][0]) + N%X[0][0]
    if k == 2:
        c = 0
        for i in range(N//X[0][0]+1):
            j = (N-i*X[0][0])//X[1][0]
            c = max(X[0][1]*i + X[1][1]*j + (N-i*X[0][0])%X[1][0], c)
        return c
    if k == 3:
        if (N//X[1][0]+1)*(N//X[0][0]+1) <= 10**6 :
            return max(X[0][1]*i + max(X[1][1]*j + X[2][1]*((N-i*X[0][0]-j*X[1][0])//X[2][0]) + ((N-i*X[0][0]-j*X[1][0])%X[2][0]) for j in range((N-i*X[0][0])//X[1][0]+1)) for i in range(N//X[0][0]+1))
        else:
            import numpy as np
            dp = np.zeros(N+1, dtype=int)
            for w in range(1,N+1):
                dp[w] = max(dp[w-X[i][0]]+X[i][1] if w>=X[i][0] else w for i in range(k))
            N = dp[-1]
            return N

def solve():
    N = int(input())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    res = small_dp(small_dp(N, A, B), B, A)

    return str(res)

if __name__ == '__main__':
    print(solve())
from collections import deque
n,m=map(int,input().split())
A=[set() for _ in range(m)]
for i in range(m):
  a,b=map(int,input().split())
  A[a-1].add(b)
  A[b-1].add(a)
visit=[0]*n
visit[0]=n+1
stack=deque()
stack.append(1)
while stack:
  now=stack.popleft()
  for j in A[now-1]:
    if visit[j-1]==0:
      visit[j-1]=now
      stack.append(j)
if min(visit)>0:
  print('Yes')
  for j in range(1,n):
    print(visit[j])
else:
  print('No')
    

### FIXED CODE ###

from collections import deque
n,m=map(int,input().split())
A=[set() for _ in range(n)]
for i in range(m):
  a,b=map(int,input().split())
  A[a-1].add(b)
  A[b-1].add(a)
visit=[0]*n
visit[0]=n+1
stack=deque()
stack.append(1)
while stack:
  now=stack.popleft()
  for j in A[now-1]:
    if visit[j-1]==0:
      visit[j-1]=now
      stack.append(j)
if min(visit)>0:
  print('Yes')
  for j in range(1,n):
    print(visit[j])
else:
  print('No')
ATK = input()

for i in range(len(ATK)):
   if "a" <=ATK[i]<="z":
       print(ATK[i].upper, end='')

    elif "A"<=ATK[i]<="Z":
        print(ATK[i].lower, end='')

    else:
        print(ATK[i], end='')

### FIXED CODE ###

print(input().swapcase())
#!/usr/bin/env pypy3
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    K=list(input())
    D=I()
    N=len(str(K))
    
    #dp[i][j]はi桁目まで見て，総和のmodがj，tight&lose
    dpt=[[0]*D for _ in range(N+1)]
    dpl=[[0]*D for _ in range(N+1)]
    
    start=int(K[0])
    
    #初期化
    dpt[0][0]=1
            
    #推移
    now=0#tが0ではない位置
    
    for i in range(N):
        num=(int(K[i]))
        #t
        dpt[i+1][(now+num)%D]=1
        for k in range(num):
            dpl[i+1][(now+k)%D]+=1
        now=(now+num)%D
                    
        
        #l，尺取り
        S=0
        for j in range(10):#初期化，0~9までの和
            S+=dpl[i][j%D]
            
        for j in range(D):#あまりが10~D-1,0~9の順に配る
            dpl[i+1][(j+9)%D]+=S
            dpl[i+1][(j+9)%D]%=mod
            S+=dpl[i][(j+10)%D]-dpl[i][j%D]
        
                
    #0もカウントしているmので1ひく
    print((dpt[-1][0]+dpl[-1][0]-1)%mod)
    
    
            
    
    

main()


### FIXED CODE ###

#!/usr/bin/env pypy3
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    K=input()
    D=I()
    N=len(str(K))
    
    #dp[i][j]はi桁目まで見て，総和のmodがj，tight&lose
    dpt=[[0]*D for _ in range(N+1)]
    dpl=[[0]*D for _ in range(N+1)]
    
    start=int(K[0])
    
    #初期化
    dpt[0][0]=1
            
    #推移
    now=0#tが0ではない位置
    
    for i in range(N):
        num=(int(K[i]))
        #t
        dpt[i+1][(now+num)%D]=1
        for k in range(num):
            dpl[i+1][(now+k)%D]+=1
        now=(now+num)%D
                    
        
        #l，尺取り
        S=0
        for j in range(10):#初期化，0~9までの和
            S+=dpl[i][j%D]
            
        for j in range(D):#あまりが10~D-1,0~9の順に配る
            dpl[i+1][(j+9)%D]+=S
            dpl[i+1][(j+9)%D]%=mod
            S+=dpl[i][(j+10)%D]-dpl[i][j%D]
        
                
    #0もカウントしているmので1ひく
    print((dpt[-1][0]+dpl[-1][0]-1)%mod)
    
    
            
    
    

main()
import sympy

def count_divisor(num: int) -> int:
    i =1 
    count = 0
    while i * i < num:
        if num % i == 0:
            count += 2
        i += 1
    if num % i == 0:
        count += 1
    return count

M = 10**9+7
N = int(input())

data = [0] * (N+1)
i = N
while i > 0:
    dic = sympy.factorint(i)
    for k, v in dic.items():
        data[k] += v
    i -= 1

ans = 1
for d in data:
    if d != 0:
        ans = ans * (d+1) % M
        ans %= M

print(ans)


### FIXED CODE ###

#import sympy

def count_divisor(num: int) -> int:
    i =1 
    count = 0
    while i * i < num:
        if num % i == 0:
            count += 2
        i += 1
    if num % i == 0:
        count += 1
    return count

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])

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

    return arr

M = 10**9+7
N = int(input())

data = [0] * (N+1)
i = N
while i > 0:
    #dic = sympy.factorint(i)
    lis = factorization(i)
    #for k, v in dic.items():
    #    data[k] += v
    for li in lis:
        k, v = li
        data[k] += v 
    i -= 1

ans = 1
data[1] = 0
for d in data:
    if d != 0:
        ans = ans * (d+1) % M
        ans %= M

print(ans)
#print(factorization(1))
#print(sympy.factorint(1))
#coding: utf-8
N = int(input())
l = []
for i in range(N):
    a = list(map(int, input().split()))
    l.append(a)
H = []
for i in range(N):
    Hn = []
    for cx in range(101):
        for cy in range(101):
            H_tmp = l[i][2] + abs(l[i][0] - cx) + abs(l[i][1] - cy)
            Hn.append([cx, cy, H_tmp])
    if i == 0:
        ans = []
        H = Hn[:]
    else:
        ans = []
        for j in range(len(H)):
            if H[j] in Hn:
                ans.append(H[j])
        H = ans[:]
print(H[0][0], H[0][1], H[0][2])

### FIXED CODE ###

#coding: utf-8
N = int(input())
l = []
for i in range(N):
    a = list(map(int, input().split()))
    if a[2] > 0:
      l.append(a)
if len(l) >= 2:
    for i in range(len(l)-1):
        ans = []
        for cx in range(101):
            for cy in range(101):
                if l[i][2] + abs(l[i][0] - cx) + abs(l[i][1] - cy) == l[i+1][2] + abs(l[i+1][0] - cx) + abs(l[i+1][1] - cy) and l[i][2] != 0 and l[i+1][2] != 0:
                    if i == 0:
                        ans.append([cx, cy])
                    else:
                        if [cx, cy] in ansn:
                            ans.append([cx, cy])
        ansn = ans[:]
        if len(ans) == 1:
            break
    print(ans[0][0], ans[0][1], l[0][2] + abs(l[0][0] - ans[0][0]) + abs(l[0][1] - ans[0][1]))
else:
    print(l[0][0], l[0][1], l[0][2])