Harryxun/stf_run huggingface dataset:
K=int(input())
S=input()

def printt(S,K):
  if len(S)<=K:
    print(S)
  else:
    print(s[:k]+'...')
      
printt(S,K)


### FIXED CODE ###

N=int(input())

def ass(N):
  if N%10 in [2,4,5,7,9]:
    print('hon')
  elif N%10 in [0,1,6,8]:
    print('pon')
  else:
    print('bon')
   
ass(N)
N, M = map(int, input().split())
g = {}
for i in range(M):
  a, b = map(int, input().split())
  if a in g.keys():
    g[a].append(b)
  else:
    g[a] = [b]
  if b in g.keys():
    g[b].append(a)
  else:
    g[b] = [a]
ans = [0 for _ in range(N+1)]
#print(g)
current = [1]
while 0 in ans[2:]:
  #print(ans)
  for i in current:
    next = []
    #print('i',i)
    for j in g[current]:
      if ans[j] == 0:
        ans[j] = i
        next.append(j)
  current = next
print('Yes')
for i in range(2,N+1):
  print(ans[i])


### FIXED CODE ###

import sys
from collections import defaultdict
input = sys.stdin.readline
N, M = map(int, input().split())
g = defaultdict(list)
for i in range(M):
  a, b = map(int, input().split())
  g[a].append(b)
  g[b].append(a)
que = [1]
ans = [0 for _ in range(N+1)]
while len(que)>0:
  current = que.pop(0)
  for next in g[current]:
    if ans[next] == 0:
      que.append(next)
      ans[next] = current
print('Yes')
for i in range(2,N+1):
  print(ans[i])
a, b = input().split()
print(a * b)


### FIXED CODE ###

a, b = map(int, input().split())
print(a * b)
n = int(input())
A = [list(map(int,input().split())) for i in range(n-1)]

B = [[] for i in range(n+1)]

for i in range(len(A)):
    B[A[i][0]].append([A[i][1],A[i][2]])
    B[A[i][1]].append([A[i][0],A[i][2]])

root = 0
for i in range(len(B)):
    root = max(root, len(B[i]))

ANS = [0 for i in range(n+1)]

def nuru(k):
    col = ANS[k]
    for j in range(len(B[k])):
        ANS[B[k][j][0]] = (col + B[k][j][1])%2
        nuru(j)

nuru(root)

#print(ANS)

for i in range(n):
    print(ANS[i+1])


### FIXED CODE ###

n = int(input())
A = [list(map(int,input().split())) for i in range(n-1)]

B = [[] for i in range(n+1)]

for i in range(len(A)):
    B[A[i][0]].append([A[i][1],A[i][2]])
    B[A[i][1]].append([A[i][0],A[i][2]])

root = 0
for i in range(len(B)):
    root = max(root, len(B[i]))

ANS = [-1 for i in range(n+1)]
ANS[root]=0
#print(B)
nurulist = [root]
t = 0
while t < len(nurulist):
    k = nurulist[t]
    col = ANS[k]
    for j in range(len(B[k])):
        if ANS[B[k][j][0]] == -1:
            ANS[B[k][j][0]] = (col + B[k][j][1])%2
            nurulist.append(B[k][j][0])
    t += 1


#print(ANS)

for i in range(n):
    print(ANS[i+1])
#1以上N以下の整数のうち、10進法で各桁の和がA以上B以下であるものについて総和
  
n=int(input())
a=int(input())
b=int(input())

def s(x):
        return x//10000 + x%10000//1000 + x%1000//100 + x%100//10 + x%10

sum=0

for i in range(n+1):
        if a<=int(s(i))<=b:
                sum+=i

print(sum)

### FIXED CODE ###

#天秤
  
a,b,c,d=map(int,input().split())

l=a+b
r=c+d

if l==r:
	print("Balanced")
else:
	if l>r:
		print("Left")
	else:
		print("Right")
N,M = map(int,input().split())

a = int(M/N)
b = int(M%N)

for i in range(a-b,0,-1):
    if M % i == 0:
        c = i
        break

print(c)

### FIXED CODE ###

import math

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

a = int(M/N)
q = int(math.sqrt(M))

m = 0
for i in range(1,q+1):
    if M % i == 0:
        if i <= a:
            m = max(m,i)
        b = int(M / i)
        if b <= a:
            m = max(m,b)

print(m)
from collections import deque

n,m=map(int,input().split())

edges=[[] for _ in range(n)]#[[１番目の部屋からいける部屋],[２番目の部屋からいける部屋]...]

for _ in range(m):
    a,b=map(int,input().split())
    edges[a-1].append(b-1)
    edges[b-1].append(a-1)

todo=deque([0,0])
seen=[-1]*n
seen[0]=0

while todo:
    node,parent=todo.popleft()#現在探索している部屋、その親
    
    for to in edges[node]:
        if seen[to]!=-1:
            continue

        todo.append([to,node])
        seen[to]=node

print('Yes')

for parent in seen[1:]:
    print(parent+1)

### FIXED CODE ###

from collections import deque

n,m=map(int,input().split())

edges=[[] for _ in range(n)]#[[１番目の部屋からいける部屋],[２番目の部屋からいける部屋]...]

for _ in range(m):
    a,b=map(int,input().split())
    edges[a-1].append(b-1)
    edges[b-1].append(a-1)

todo=deque([[0,0]])
seen=[-1]*n
seen[0]=0

while todo:
    node,parent=todo.popleft()#現在探索している部屋、その親
    
    for to in edges[node]:
        if seen[to]!=-1:
            continue

        todo.append([to,node])
        seen[to]=node

print('Yes')

for parent in seen[1:]:
    print(parent+1)
a,b = map(int,input().split())
n = list(input())

if n[a] == '-' and '-' not in n[:a] and '-' not in n[a+1:]
  print('Yes')
else:
  print('No')

### FIXED CODE ###

a,b = map(int,input().split())
n = list(input())
 
if n[a] == '-' and '-' not in n[:a] and '-' not in n[a+1:]:
  print('Yes')
else:
  print('No')
N,K = list(map(int,input().split()))

A = list(map(int,input().split()))
visited = [1]
visited_list = [0]*N
visited_list[0] = 1
k = 0
l = 0
kaburi = 1
flag = True
def f(Ai):
    global k,l,visited,kaburi,flag
    # print("Ai",Ai,k)
    if visited_list[Ai-1] == 1 :
        kaburi = Ai
        k += 1
        l = k
    else:
        visited.append(Ai)
        visited_list[Ai-1] = 1
        k += 1
        if k == K:
            flag = False
            print(Ai)
        else:
            f(A[Ai-1])

f(A[0])
if flag == True:
    hazime = visited.index(kaburi)
    b = visited[hazime:]
    print(b[(K-hazime)%(l-hazime)])

### FIXED CODE ###

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

A = [0]+ list(map(int,input().split()))

n = 1
visited = [1]
visitedbit = [0] * (N+1) 
visitedbit[1] = 1
k = 0
flag = True
while True:
    
    k += 1
    #A[n]はテレポート先
    if k == K:
        print(A[n])
        flag = False
        break
    if visitedbit[A[n]]  == 0:
        visited.append(A[n])
        visitedbit[A[n]] = 1
        n = A[n]
    else:
        hazime = visited.index(A[n])
        break

if flag == True:
    # print(visited)
    loop = visited[hazime:]
    # print(loop)
    # print(hazime)
    print(loop[ (K-hazime)%(len(loop)) ])
X=input()

if (X>40 or X<-40):
  return 0
elif(X=>30 and X=<40):
  print('Yes')
elif(X=>-40 and X<30)
  print('No')



### FIXED CODE ###

x=input()
X=int(x)
if(X>=30 and X<=40):
  print('Yes')
elif(X>=-40 and X<30):
  print('No')
from random import randint

D = int(input())
C = [int(i) for i in input().split()]
S = [[int(i) for i in input().split()] for j in range(D)]

def score_calc(T):
    total = 0
    last = [0] * 26
    for i in range(1, D+1):
        t = T[i-1]
        total += S[i-1][t-1]
        last[t-1] = i
        for j in range(26):
            total -= C[j] * (i - last[j])
    return total

total = 0
last = [0] * 26
ans = []
for i in range(1, D+1):
    score = [0] * 26
    for t in range(26):
        score[t] += S[i-1][t]
        for j in range(26):
            if j != t:
                score[t] -= C[j] * (i - last[j])
    total += max(score)
    last[score.index(max(score))] = i
    ans.append(score.index(max(score))+1)

N = 1000
Q = [[randint(0, 364), randint(0, 25)] for i in range(N)]
for d, q in Q:
    old = ans[d]
    ans[d] = q + 1
    if score_calc(ans) > total:
        total = score_calc(ans):
    else:
        ans[d] = old

for i in range(D):
    print(ans[i])

### FIXED CODE ###

D = int(input())
C = [int(i) for i in input().split()]
S = [[int(i) for i in input().split()] for j in range(D)]

total = 0
last = [0] * 26
ans = []
for i in range(1, D+1):
    score = [0] * 26
    for t in range(26):
        score[t] += S[i-1][t-1]
        for j in range(26):
            if j != t:
                score[t] -= C[j] * (i - last[j])
    total += max(score)
    last[score.index(max(score))] = i
    ans.append(score.index(max(score))+1)

for i in range(D):
    print(ans[i])
print 1 2

### FIXED CODE ###

import sys
for l in sys.stdin:
 x,y=map(int, l.split())
 m=x*y
 while x%y:x,y=y,x%y
 print "%d %d"%(y,m/y)
N = int(input())
h = list(map(int,input().split()))
H = [0]*N
for i in range(1,N):
    if i == 1:
        H[i] = abs(h[1]-h[0])
    else:
        H[i] = H[i-1]+abs(h[i]-h[i-1]
        if H[i] > H[i-2]+abs(h[i]-h[i-2]):
            H[i] = H[i-2]+abs(h[i]-h[i-2])
print(H[N-1])

### FIXED CODE ###

N = int(input())
h = list(map(int,input().split()))
H = [0]*N
for i in range(1,N):
    if i == 1:
        H[i] = abs(h[1]-h[0])
    else:
        H[i] = min(H[i-1]+abs(h[i]-h[i-1]),H[i-2]+abs(h[i]-h[i-2]))
print(H[N-1])
#全探索
def jump_all(cs):
    if cs == N:
        return 0
    elif cs == N - 1:
        return jump_all(cs + 1) + (h[cs+1] - h[cs])
    else:
        SINGLE = jump_all(cs + 1) + abs(h[cs+1] - h[cs])
        DOUBLE = jump_all(cs + 2) + abs(h[cs+2] - h[cs])
        return min(SINGLE, DOUBLE)


N = int(input())
h = list(map(int, input().split()))
h.append(h[-1])
ans = jump_all(0)
print(ans)


### FIXED CODE ###

# DP
def frog_dp():
    cost = [0] * N
    for cs in range(1, N):
        if cs == 1:
            cost[cs] = abs(h[cs]-h[cs-1])
        else:
            cost[cs] = min(cost[cs-1] + abs(h[cs]-h[cs-1]), cost[cs-2] + abs(h[cs] - h[cs-2]))
    return cost[-1]


N = int(input())
h = list(map(int, input().split()))
ans = frog_dp()
print(ans)
S,T = input (),split ()
A,B = map (int, input ().split ())
U = input ()
if U == S:
  print (A-1,B)
else:
  print (A,B-1)

### FIXED CODE ###

S,T = input ().split ()
A,B = map (int, input ().split ())
U = input ()
if U == S:
  print (A-1,B)
else:
  print (A,B-1)
k, n = map(int, input().split())
a = list(map(int, input().split()))

d = [k-a[-1]+a[0]]

for i in range(n-1):
    d.append(a[i+1]-a[i])

print(a-max(dist))


### FIXED CODE ###

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

d = [k-a[-1]+a[0]]

for i in range(n-1):
    d.append(a[i+1]-a[i])

print(k-max(d))
n=int(input())
a=tuple(map(int,input().split()))

import fraction
from functools import reduce

def gcd_(*numbers):
    return reduce(fraction.gcd, numbers)

dp=[]
for i in range(n):
    aa=list(a)
    del aa[i]
    dp.append(gcd_(*aa))

print(max(dp))


### FIXED CODE ###

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

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

l=[0]*(n+1)
r=[0]*(n+1)
for i in range(n):
    l[i+1]=gcd(l[i],a[i])
for i in range(n,0,-1):
    r[i-1]=gcd(r[i],a[i-1])

m=[]
for i in range(n):
    m.append(gcd(l[i],r[i+1]))

print(max(m))
a, b = int(map(input().split()))
print(a*b)

### FIXED CODE ###

a, b = map(int, input().split())
print(a*b)
import math
a = list(map(int,input().split()))
b = list(map(int,input().split()))
if b.sum >= a[0]
	print("yes")
else
	print("no")

	

### FIXED CODE ###

a = [list(map(int,input().split())) for l in range(2)]

if sum(a[1]) >= a[0][0]:
    print("Yes")
else:
    print("No")
import numpy as np
import heapq
N = int(input())
A = []
for _ in range(N):
  A.append(int(input()))
A = np.array(A)
answer = []
for i in range(N):
  A_temp = np.delete(A, i)
  answer.append(heapq.pop(A_temp))
for i in range(N):
  print(answer[i])


### FIXED CODE ###

import numpy as np
#import heapq
N = int(input())
A = []
for _ in range(N):
  A.append(int(input()))
A = np.array(A)
A_max_1 = np.max(A)
A_max_index = np.argmax(A)
A = np.delete(A, A_max_index)
A_max_2 = np.max(A)
answer = []
for i in range(N):
  if not i == A_max_index:
    answer.append(A_max_1)
  else:
    answer.append(A_max_2)
for i in range(N):
  print(answer[i])
n,k,q=map(int,input().split())
l=[k for i in range(n)]
for j in range(q):
    k=int(input())
    for i in range(n):
        if i!=k-1:
            l[i]-=1
for i in l:
    if(i<=0):
        print("No")
    else:
        print("Yes")

### FIXED CODE ###

s=input()
l=["Sunny","Cloudy","Rainy"]
if(s=='Rainy'):
    print("Sunny")
else:
    print(l[l.index(s)+1])
s=str(input())
a=s.count('0')
print(min(ss,len(s)-ss)*2)


### FIXED CODE ###

s = str(input())
figure1 = s.count('0')
figure2 = s.count('1')
print(min(figure1, figure2)*2)
x,y = map(int,input().split());
if x = y:
	print('Yes');
else x > y:
  	print('No');

### FIXED CODE ###

str1, str2 = [s for s in input().split()]
if str1 == str2:
    print('Yes')
else:
    print('No')
i=0
while 1:
      x = int(input())
      if x==0 : break
      i+=1
      print "case %d: %d" %(i,x)
break



### FIXED CODE ###

i=0
while 1:
      x = int(input())
      if x==0 : break
      i+=1
      print "Case %d: %d" %(i,x)
import sys

def input_number():
    for i in range(n):
        adding=map(int,raw_input().split())
        A.append(adding)
    for i in range(m):
        adding=map(int,raw_input().split())
        B.append(adding)

if __name__ == '__main__':
    n,m,l=map(int,raw_input().split())
    A=[]
    B=[]
    ans=[[0 for i in range(n)]for j in range(l)]
    input_number()
    for i in range(n):
        for j in range(l):
            for k in range(m):
                ans[i][j] += A[i][k] * B[k][j]
    for i in range(n):
        for j in range(l):
            sys.stdout.write("%d" % ans[i][j])
            if j != l-1:
                sys.stdout.write(" ")
        sys.stdout.write("\n")

### FIXED CODE ###

import sys

def input_number():
    for i in range(n):
        adding=map(int,raw_input().split())
        A.append(adding)
    for i in range(m):
        adding=map(int,raw_input().split())
        B.append(adding)

if __name__ == '__main__':
    n,m,l=map(int,raw_input().split())
    A=[]
    B=[]
    ans=[[0 for j in range(l)]for i in range(n)]
    input_number()
    for i in range(n):
        for j in range(l):
            for k in range(m):
                ans[i][j] += A[i][k] * B[k][j]
    for i in range(n):
        for j in range(l):
            sys.stdout.write("%d" % ans[i][j])
            if j != l-1:
                sys.stdout.write(" ")
        sys.stdout.write("\n")
a,b,k=map(int,input().split())
import math
max_gcd=math.gcd(a, b)
yakusuu_array=[]
if k==1:
    print(max_gcd)
else:
    for i in range(1,max_gcd):
        if max_gcd % i == 0:
            yakusuu_array.append(i)

    print(yakusuu_array[-(k-1)])

### FIXED CODE ###

a,b,k=map(int,input().split())
yakusuu_array=[]
if a==b:
    max_gcd=a
else:
    for l in  reversed(range(min(a,b)+1)):
        if (a%l==0) and (b%l==0):
            max_gcd=l
            break        
if k==1:
    print(max_gcd)
else:
    for i in range(1,max_gcd):
        if max_gcd % i == 0:
            yakusuu_array.append(i)

    #print(max_gcd)
    #print(yakusuu_array)
    print(yakusuu_array[-(k-1)])
def main():
    s = input()
    for i in range(len(s)):
        if s[i]=="C":
            idx = i
            break

    for i in range(idx,len(s)):
        if s[i]=="F":
            print("Yes")
            exit()

    print("No")

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    s = list(input())
    for i in range(len(s)):
        for j in range(i+1,len(s)):
            if s[i]=="C" and s[j]=="F":
                print("Yes")
                exit()
    print("No")

if __name__ == '__main__':
    main()
N, M = map(int, input().split())
X = list(map(int, input().split()))

X.sort()

temp = []
if N > M:
    print(0)
else:
    result = 0
    for i in range(M-1):
        temp.append(-(X[i] - X[i+1]))
    temp.sort()
    for i in range(N+1):
        result += temp[i]
    print(result)


### FIXED CODE ###

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

X.sort()

result = 0
temp = []
if M <= N:
    print(0)
else:
    for i in range(M-1):
        temp.append(-(X[i] - X[i+1]))
    temp.sort()
    for i in range(M-N):
        result += temp[i]
    print(result)
import queue
n = int(raw_input())
edges = []
for i in range(n - 1):
    edges.append(map(int, raw_input().split()))
edge_num = {}
G = [[] for i in range(n + 1)]
ans = [0] * (n - 1)
for i in range(n - 1):
    s, e = edges[i]
    s = s - 1
    e = e - 1
    edge_num[(s, e)] = i
    edge_num[(e, s)] = i
    G[s].append(e)
    G[e].append(s)
vis = set([])
q = queue.Queue(n)
vis.add(u)
q.put(0)
while q.qsize() > 0:
    u = q.get()
    not_colored = []
    colors = set([])
    for v in G[u]:
        i = edge_num[(u, v)]
        if ans[i] == 0:
            not_colored.append(i)
        else:
            colors.add(ans[i])
        if not v in vis:
            vis.add(v)
            q.put(v)
    color = 1
    for i in not_colored:
        while color in colors:
            color += 1
        ans[i] = color
        color += 1
print len(set(ans))
for i in ans:
    print i

### FIXED CODE ###

from collections import deque
n = int(raw_input())
edges = []
for i in range(n - 1):
    edges.append(map(int, raw_input().split()))
edge_num = {}
G = [[] for i in range(n)]
ans = [0] * (n - 1)
for i in range(n - 1):
    s, e = edges[i]
    s = s - 1
    e = e - 1
    edge_num[(s, e)] = i
    edge_num[(e, s)] = i
    G[s].append(e)
    G[e].append(s)
vis = set([])
q = deque([0])
vis.add(0)
while q:
    u = q.popleft()
    not_colored = []
    colors = set([])
    for v in G[u]:
        i = edge_num[(u, v)]
        if ans[i] == 0:
            not_colored.append(i)
        else:
            colors.add(ans[i])
        if not v in vis:
            vis.add(v)
            q.append(v)
    color = 1
    for i in not_colored:
        while color in colors:
            color += 1
        ans[i] = color
        color += 1
print len(set(ans))
for i in ans:
    print i
N,M=input().split()
N,M=int(N),int(M)

guess = [] #答えの候補を保管
for i in range(N):
    guess.append(-1)
exits=True #答えが存在するか
ans=-1

for i in range(M):
    s,c=input().split()
    #桁数sを直感に一致させるために-1
    s,c=int(s)-1,int(c)
    if guess[s]==-1 or guess[s]==c:
        guess[s]=c
    else:
        exits=False

if guess[0]==0 or guess[0]==-1 or M==0:
    exits=False 

if exits:
    ans=0
    for i in range(N):
        ans+= guess[i]*(10**(N-i-1)) if not guess[i]==-1 else 0
	#1桁の場合はcがそのまま答え
    if N==1:
        ans=c

print(ans)

### FIXED CODE ###

N = int(input())
if N%2 ==1:
    N += 1
print(int(N/2))
A, B = map(int, input() ,split() )
print(A * B)

### FIXED CODE ###

A, B = map(int,input().split())
print(A * B)
x = int(input().split(" "))
if x[0] == 1 and x[1] == 1:
    count =1
elif x[0] == 1 or x[1] == 1:
    count = max(x[0], x[1])-2
else:
    count = (x[0]-2)*(x[1]-2)
print(count)

### FIXED CODE ###

list = input().split(" ")
x = [int(y) for y in list]
if x[0] == 1 and x[1] == 1:
    count =1
elif x[0] == 1 or x[1] == 1:
    count = max(x[0], x[1])-2
else:
    count = (x[0]-2)*(x[1]-2)
print(count)
N = int(input())
A = list(int(x) for x in input().split())
B = list(int(x) for x in input().split())
a = 0
b = 0
for x in range(N):
    B[x] = B[x] + a
    if A[x] > B[x]:
        b = b + B[x]
        a = 0
    else:
        b = b + A[x]
        if A[x] > a:
            a = B[x] - A[x]
        else:
            a = B[x]
if A[N - 1] > B[N - 1]:
    print(b)
else:
    if A[N] > a:
        print(b + a)
    else:
        print(b + A[N])

### FIXED CODE ###

A , B = (int(x) for x in input().split())
k = (B + A) / 2
K = (B + A) % 2
if K == 0:
    print(int(k))
else:
    print("IMPOSSIBLE")
n = int(input())
ans = 1
for i in range(1, n+1):
  ans *= i
print(ans/(10**9+7))

### FIXED CODE ###

n = int(input())
ans = 1
for i in range(1, n+1):
  ans *= i
  if ans >= 10**9 + 7:
    ans %= 10**9 + 7
print(ans)
import numpy as np
N = int(input())
ABC = np.zeros([N, 3])
for i in range(N):
    ABC[i] = list(map(int, input().split()))

dp = np.zeros([N, 3])
dp[0] = ABC[0]
for i in range(N-1):
    dp[i+1, 0] = max(dp[i, 1], dp[i, 2]) + ABC[i+1, 0]
    dp[i+1, 1] = max(dp[i, 0], dp[i, 2]) + ABC[i+1, 1]
    dp[i+1, 2] = max(dp[i, 0], dp[i, 1]) + ABC[i+1, 2]

print(int(max(dp[N-1])))

### FIXED CODE ###

import numpy as np
N = int(input())
ABC = np.zeros([N, 3])
for i in range(N):
    ABC[i] = list(map(int, input().split()))

dp = np.zeros([N, 3])
dp[0] = ABC[0]
for i in range(N-1):
    dp[i+1, 0] = max(dp[i, 1], dp[i, 2]) + ABC[i+1, 0]
    dp[i+1, 1] = max(dp[i, 0], dp[i, 2]) + ABC[i+1, 1]
    dp[i+1, 2] = max(dp[i, 0], dp[i, 1]) + ABC[i+1, 2]

print(int(max(dp[N-1])))
n=int(input())
w=list(map(int,input().split()))
x=0
for i in range(n):
  s=abs(w[:i+1]-w[i+1:])
  if x==0 or x<s:
    x=s
print(x)


### FIXED CODE ###

from itertools import accumulate
n=int(input())
w=list(map(int,input().split()))
w=list(accumulate(w))
for i in range(n):
  if w[i]*2==w[-1]:
    print(0)
    break
  elif w[i]*2>w[-1]:
    print(min((w[i]*2-w[-1]),(w[-1]-w[i-1]*2)))
    break
import sys
input = sys.stdin.readline
s=input().strip()
a=[]
for i in range(3):
    a.append(s[i])
a.sort()
if a[0]=="a" and a[1]=="b" and a[2]="c":
    print("Yes")
else:
    print("No")


### FIXED CODE ###

import sys
input = sys.stdin.readline
s=input().strip()
a=[]
for i in range(3):
    a.append(s[i])
a.sort()
if a[0]=="a" and a[1]=="b" and a[2]=="c":
    print("Yes")
else:
    print("No")
vs = map(int,input().split())
for i in range(len(vs)):
    if vs[i] == 0:
        print(i)

### FIXED CODE ###

vs = list(map(int,input().split()))
for i in range(len(vs)):
    if vs[i] == 0:
        print(i+1)
import numpy as np

N = int(input())
an = list(map(int,input().split()))
solve = []

while len(an) > 0:
    k = np.argmax(an)
    l = max(an)
    j = 0
    for i in range(k,N):
        j = l - an[i]
        solve.append(j)
    del an[k:N]
    N -= len(solve)

solved = sum(solve)

print(solved)

### FIXED CODE ###

N = int(input())
an = list(map(int,input().split()))
solve = []

ans = 0
maxnum = 0

for i in range(N):
    maxnum = max(maxnum,an[i])
    ans += maxnum - an[i]
print(ans)
import sys
sys.setrecursionlimit(1000000)

def f(b, n):
    return n if n < b else n % b + f(b, n // b)

def solve():
    N, S = map(int, open(0))

    if N == S:
        return N + 1

    sqr = int(N ** 0.5)

    for b in range(2, sqr + 1):
        if f(b, N) == S:
            return b

    M = N - S
    for p in reversed(range(1, sqr + 1)):
        b = M // p + 1
        if f(b, N) == S:
            return b

    return -1

print(solve())

### FIXED CODE ###

def f(b, n):
    return n if n < b else n % b + f(b, n // b)

def solve():
    N, S = map(int, open(0))

    if N == S:
        return N + 1

    sqr = int(N ** 0.5)

    for b in range(2, sqr + 1):
        if f(b, N) == S:
            return b

    M = N - S
    for p in reversed(range(1, sqr + 1)):
        b = M // p + 1
        if b >= 2 and f(b, N) == S:
            return b

    return -1


print(solve())
n = int(input())
k = int(input())
price = []
cost = 0
for p in range(n):
        p = int(input())
        price.append(p)

price.sort()
del price[k:]
for p in price:
        cost += p

print(cost)

### FIXED CODE ###

n, k,  =map(int, input().split())
cost = 0
price = list(map(int, input().split()))
        
price.sort()
del price[k:]
for p in price:
        cost += p

print(cost)
n = int(input())
a = list(map(int, input().split()))
a = [a[i]-i for i in range(n)]

import numpy as np
a = np.array(a)
x = np.median(a)
r = 0
for i in range(n):
    r += abs(a[i]-x)
print(int(r))

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split(' ')))
a = [a[i]-i-1 for i in range(n)]
a.sort()
if n%2 == 0:
    num = int(n/2)
    b = int((a[num-1]+a[num])/2)
    a = [abs(a[i]-b) for i in range(n)]
else:
    num = int(n/2)
    b = int(a[num])
    a = [abs(a[i]-b) for i in range(n)]
print(sum(a))
N = int(input())
vec = []

k = 0
sum = 0
while(k**2 + k < 2*N):
  k += 1
  sum += k
  vec.append(k)

vec.remove(sum - N)

for i in range(len(vec)):
  print(vec[i])

### FIXED CODE ###

N = int(input())
vec = []

k = 0
sum = 0
while(k**2 + k < 2*N):
  k += 1
  sum += k
  vec.append(k)
if(sum - N):
  vec.remove(sum - N)


for i in range(len(vec)):
  print(vec[i])