Harryxun/stf_run huggingface dataset:
s = input()

dic = {}
for i in range(len(s)):
  if s[i] in dic:
    dic[s[i]] += 1
  else:
    dic[s[i]] = 1

if len(dic) == 1:
  if len(s) == 1:
    print('YES')
  else:
    print('No')

elif len(dic) == 2:
  print('NO')

else:
  first = 'a'
  second = 'b'
  for k, v in dic.items():
    if  v > dic[first]:
      second = first
      first = k

    elif v > dic[second]:
      second = k

  tmp = first + second
  dic[first] -= 1
  dic[second] -= 1
  ans = 'YES'
  for i in range(1, len(s) - 1):
    if tmp[i-1] == 'a':
      if tmp[i] == 'b':
        if dic['c'] == 0:
          ans = 'NO'
          break
        else:
          dic['c'] -= 1
          tmp += 'c'

      if tmp[i] == 'c':
        if dic['b'] == 0:
          ans = 'NO'
          break
        else:
          dic['b'] -= 1
          tmp += 'b'

    elif tmp[i-1] == 'b':
      if tmp[i] == 'a':
        if dic['c'] == 0:
          ans = 'NO'
          break
        else:
          dic['c'] -= 1
          tmp += 'c'

      if tmp[i] == 'c':
        if dic['a'] == 0:
          ans = 'NO'
          break
        else:
          dic['a'] -= 1
          tmp += 'a'

    elif tmp[i-1] == 'c':
      if tmp[i] == 'a':
        if dic['b'] == 0:
          ans = 'NO'
          break
        else:
          dic['b'] -= 1
          tmp += 'b'

      if tmp[i] == 'b':
        if dic['a'] == 0:
          ans = 'NO'
          break
        else:
          dic['a'] -= 1
          tmp += 'a'

  print(ans)


### FIXED CODE ###

s = input()

dic = {}
for i in range(len(s)):
  if s[i] in dic:
    dic[s[i]] += 1
  else:
    dic[s[i]] = 1

if len(dic) == 1:
  if len(s) == 1:
    print('YES')
  else:
    print('NO')

elif len(dic) == 2:
  if len(s) == 2:
    print('YES')
  else:
    print('NO')

else:
  first = 'a'
  second = 'b'
  for k, v in dic.items():
    if  v > dic[first]:
      if k != first:
        second = first
        first = k

    elif v > dic[second]:
      if k != second and k != first:
        second = k


  tmp = first + second
  dic[first] -= 1
  dic[second] -= 1
  ans = 'YES'

  for i in range(1, len(s) - 1):
    if tmp[i-1] == 'a':
      if tmp[i] == 'b':
        if dic['c'] == 0:
          ans = 'NO'
          break
        else:
          dic['c'] -= 1
          tmp += 'c'

      if tmp[i] == 'c':
        if dic['b'] == 0:
          ans = 'NO'
          break
        else:
          dic['b'] -= 1
          tmp += 'b'

    elif tmp[i-1] == 'b':
      if tmp[i] == 'a':
        if dic['c'] == 0:
          ans = 'NO'
          break
        else:
          dic['c'] -= 1
          tmp += 'c'

      if tmp[i] == 'c':
        if dic['a'] == 0:
          ans = 'NO'
          break
        else:
          dic['a'] -= 1
          tmp += 'a'

    elif tmp[i-1] == 'c':
      if tmp[i] == 'a':
        if dic['b'] == 0:
          ans = 'NO'
          break
        else:
          dic['b'] -= 1
          tmp += 'b'

      if tmp[i] == 'b':
        if dic['a'] == 0:
          ans = 'NO'
          break
        else:
          dic['a'] -= 1
          tmp += 'a'

  print(ans)
import numpy as np
inp1 = input().split()
inp2 = input().split()

a = int(inp1[0])
b = np.array(inp2).astype(int)
ansno = a
maxno = b[0]

ii = 0
for i in b:
  bslice = b[:ii+1]
  if min(bslice) != i:
    ansno -=1
  ii+=1
print(ansno)


### FIXED CODE ###

n = int(input())
m = input().split()
ppp = list(map(int, m))
max = 2*10**5+1
ans = 0
for p in ppp:
    if p < max:
        ans += 1
        max = p
print(ans)
s = input()
print(s[0]+str(len(s-2))+s[-1])

### FIXED CODE ###

s = input()
print(s[0]+str(len(s)-2)+s[-1])
mass = [0] * 1000
num = [0] * 1000
while True:
  N, M = map(int, raw_input().split())
  if N == 0 and M == 0:
    break
  p = 0
  for i in range(N):
    mass[i] = input()
  for i in range(M):
    num[i] = input()

  for i in range(M):
    p += num[i];
    p += mass[p]
    if p >= N - 1:
      print i + 1
      break

### FIXED CODE ###

mass = [0] * 2000
num = [0] * 1000
while True:
  N, M = map(int, raw_input().split())
  if N == 0 and M == 0:
    break
  p = 0
  for i in range(N):
    mass[i] = input()
  for i in range(M):
    num[i] = input()

  for i in range(M):
    p += num[i];
    p += mass[p]
    if p >= N - 1:
      print i + 1
      break
from itertools import groupby
import sys
rr = lambda: sys.stdin.readline().rstrip()
s = rr()
print('Good' if len(groupby(s)) == 4 else 'Bad')
















### FIXED CODE ###

from itertools import groupby
import sys
rr = lambda: sys.stdin.readline().rstrip()
s = rr()
print('Good' if len(list(groupby(s))) == 4 else 'Bad')
n = int(input())
a = [int(i) for i input().split()]

for i in range(n):
    v = a[i]
    j = i - 1
    while j >= 0 and a[j] > v:
        a[j+1] = a[j]
        j -= 1
    a[j+1] = v
    print(" ".join(map(int, a)))

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]

for i in range(n):
    v = a[i]
    j = i - 1
    while j >= 0 and a[j] > v:
        a[j+1] = a[j]
        j -= 1
    a[j+1] = v
    print(" ".join(map(str, a)))
a,b,c=map(int, input().split())
if 0<(c-a-b)**2-4*a*b and 0<c-a-b:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

s=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k=int(input())
print(s[k-1])
a=input()
s=input()
if a >= 3200:
  print(s)
else:
  print("red")

### FIXED CODE ###

a=int(input())
s=str(input())
if a >= 3200:
  print(s)
else:
  print("red")
from collections import namedtuple

Point = namedtuple('Point', ['x', 'y'])

N = int(input())

R = []
for _ in range(N):
    x, y = map(int, input().split())
    R.append(Point(x, y))

B = []
for _ in range(N):
    x, y = map(int, input().split())
    B.append(Point(x, y))

E = [[] for _ in range(N)]
for i, r in enumerate(R):
    for j, b in enumerate(B):
        if r.x < b.x and r.y < b.y:
            E[i].append(j)


class BipartiteMatching:
    def __init__(self, max_u: int, max_v: int, edges):
        self.max_u = max_u
        self.max_v = max_v
        self.edges = edges  # u->vの隣接行列
        self.__match = None

    def dfs(self, v: int, visited: set) -> bool:
        for u in self.edges[v]:
            if u in visited:
                continue
            visited.add(u)

            if self.__match[u] == -1 or self.dfs(self.__match[u], visited):
                self.__match[u] = v
                return True
        return False

    def execute(self):
        self.__match = [-1 for _ in range(self.max_u)]
        return sum(self.dfs(u, set()) for u in range(self.max_u))


print(BipartiteMatching(N, E).execute())


### FIXED CODE ###

from collections import namedtuple

Point = namedtuple('Point', ['x', 'y'])
# Edge = namedtuple('Edge', ['from', 'to'])

N = int(input())

R = []
for _ in range(N):
    x, y = map(int, input().split())
    R.append(Point(x, y))

B = []
for _ in range(N):
    x, y = map(int, input().split())
    B.append(Point(x, y))

E = [[] for _ in range(N)]
for i, r in enumerate(R):
    for j, b in enumerate(B):
        if r.x < b.x and r.y < b.y:
            E[i].append(j)

match = [-1 for _ in range(N)]


def dfs(v: int, visited: set) -> bool:
    for u in E[v]:
        if u in visited:
            continue
        visited.add(u)

        if match[u] == -1 or dfs(match[u], visited):
            match[u] = v
            return True
    return False


def bipartite_matching():
    return sum(dfs(i, set()) for i in range(N))


print(bipartite_matching())
n,k,m = map(int, input().split())
a = input().split()
a = [int(_a) for _a in a]
ans = m*n - sum(a)
if ans >= k:
  ans = -1
print(ans)

### FIXED CODE ###

C = input()

ans = ''
for i in range(26):
  if chr(ord('a') + i) == C:
    ans = chr(ord('a') + i + 1)
    
print(ans)
import numpy as np
n, m = [int(i) for i in input().split()]
a =[]
d = 1000000007

for i in range(m):
    a1=int(input())
    a.append(a1)

a.append(n+1)
a = np.array(a)
#print(a)

if 1 in a[1:]-a[:-1]:
    print(0)

else:
    dp = [0]*(n+1)
    dp[1]=1
    dp[2]=1
    for i in range(3,len(dp)):
        dp[i]=dp[i-1]+dp[i-2]
        #dp[i]=dp[i]%d

    if m == 0:
        print(dp[n]%d)

    else:
        ans = []
        pre = 0
        for i in range(len(a)):
            if i == 0:
                ans.append(a[i]-pre)
            else:
                ans.append(a[i]-pre-1)
            pre = a[i]

        #print(ans)
        x = 1
        for i in ans:
            x = x*dp[i]%d
        print(x)

### FIXED CODE ###

import numpy as np
n, m = [int(i) for i in input().split()]
a =[]
d = 1000000007

for i in range(m):
    a1=int(input())
    a.append(a1)

a.append(n+1)
a = np.array(a)
#print(a)

if 1 in a[1:]-a[:-1]:
    print(0)

else:
    dp = [0]*110000
    dp[1]=1
    dp[2]=1
    for i in range(3,len(dp)):
        dp[i]=dp[i-1]+dp[i-2]
        dp[i]=dp[i]%d

    ans = []
    pre = 0
    for i in range(len(a)):
        if i == 0:
            ans.append(a[i]-pre)
        else:
            ans.append(a[i]-pre-1)
        pre = a[i]

    #print(ans)

    if m == 0:
        print(dp[n+1])
    else:
        x = 1
        for i in ans:
            x = x*dp[i]%d
        print(x)
N = int(input())
B = input()

B_1 = B.count("1")
mod_p1 = int(B,2) % (B_1+1)
if B_1 != 1:
    mod_m1 = int(B,2) % (B_1-1)

def calc_small(n, iter):
    iter += 1
    mod = n % bin(n).count("1")

    if mod == 0:
        return iter
    else:
        return calc_small(mod, iter)

p = pow(2,N)
for i in range(N):
    p = int(p / 2)
    if B_1 == 1 and int(B[i]) == 1:
        print(0)
        continue
    mod = (mod_m1 - p) % (B_1-1) if int(B[i]) == 1 else (mod_p1 + p) % (B_1+1)
    iter = 1
    if mod == 0:
        print(iter)
    else:
        print(calc_small(mod, iter))


    





### FIXED CODE ###

N = int(input())
B = input()

B_1 = B.count("1")
mod_p1 = int(B,2) % (B_1+1)
if B_1 != 1:
    mod_m1 = int(B,2) % (B_1-1)

def calc_small(n, iter):
    iter += 1
    mod = n % bin(n).count("1")

    if mod == 0:
        return iter
    else:
        return calc_small(mod, iter)

for i in range(N):
    if B_1 == 1 and int(B[i]) == 1:
        print(0)
        continue
    mod = (mod_m1 - pow(2,N-i-1,B_1-1)) % (B_1-1) if int(B[i]) == 1 else (mod_p1 + pow(2,N-i-1,B_1+1)) % (B_1+1)
    iter = 1
    if mod == 0:
        print(iter)
    else:
        print(calc_small(mod, iter))
import math
import copy
from copy import deepcopy
import sys
import fractions
import numpy as np
from functools import reduce
import statistics
import heapq

# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

def getInputStr():
    inputStr = str(input())
    return inputStr

data = getInputStr()

a = str(data)
listStr = []
listStr = list(a)

# del listStr[len(listStr)-1]
listStr.reverse()

dp = [[0]*13 for _ in range(len(listStr)+1)]
dp[0][0] = 1

INF = 10 ** 9 + 7

for i in range(len(listStr)):
    keta = pow(10, i) % 13


    if listStr[i] == "?":
        for k in range(10):
            for j in range(13):
                dp[i+1][int(((k*keta)%13 + j) % 13)] += dp[i][j]
                # dp[i+1][int(((k*keta)%13 + j) % 13)] += dp[i][j]
    else:
        k = int(listStr[i])
        for j in range(13):
            dp[i + 1][int(((k * keta) % 13 + j) % 13)] += dp[i][j]

ans = dp[len(listStr)][5] % INF
print(ans)

### FIXED CODE ###

import sys
import re
import math
import collections
import bisect
import itertools
import fractions
import functools
import copy
import heapq
import decimal
import statistics
import queue

# import numpy as np

sys.setrecursionlimit(10 ** 9)
INF = 10 ** 16
MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))
nb = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().split()))


# ===CODE===


def main():
    s = list(input())
    l = len(s)
    dp = [[0 for _ in range(13)] for __ in range(l + 1)]
    dp[0][0] = 1

    for i, si in enumerate(s):
        base = pow(10, l - i - 1, 13)

        if si == "?":
            for k in range(10):
                tmp = base * k % 13
                for j in range(13):
                    dp[i + 1][(j + tmp) % 13] += dp[i][j]
                    dp[i + 1][(j + tmp) % 13] %= MOD
        else:
            si = int(si)
            tmp = base * si % 13
            for j in range(13):
                dp[i + 1][(j + tmp) % 13] += dp[i][j]
                dp[i + 1][(j + tmp) % 13] %= MOD

    print(dp[l][5])


if __name__ == '__main__':
    main()
from math import gcd
a,b = map(int,input().split())
print(a * b / (gcd(a,b)))

### FIXED CODE ###

import fractions
a,b = map(int,input().split())
print(a*b//(fractions.gcd(a,b)))
a,b,c =map(int,input().split())
s = a+b+c
print(s)

### FIXED CODE ###

s = int(input())
a=int(s/100)
s-=100*a
b=int(s/10)
s-=10*b

print(a+b+s)
a,b=map(int,input().split())

n=100
if a<=b:
    grid=[["."]*n for _ in range(n)]
    s=b-a+1
    for i in range(s):
        grid[0][2*i]="#"
    k=1
    t=1
    for i in range(1,a):
        if t==n//4+1:
            t=1
            k+=1
        grid[4*k-2][4*(t-1)]=grid[4*k-2][4*(t-1)+1]=grid[4*k-2][4*(t-1)+2]="#"
        grid[4*k-1][4*(t-1)]=grid[4*k-1][4*(t-1)+2]="#"
        grid[4*k][4*(t-1)]=grid[4*k][4*(t-1)+1]=grid[4*k][4*(t-1)+2]="#"
        t+=1
else:
    grid=[["#"]*n for _ in range(n+1)]
    s=a-b+1
    for i in range(s):
        grid[0][2*i]="."
    k=1
    t=1
    for i in range(1,b):
        if t==n//4+1:
            t=1
            k+=1
        grid[4*k-2][4*(t-1)]=grid[4*k-2][4*(t-1)+1]=grid[4*k-2][4*(t-1)+2]="."
        grid[4*k-1][4*(t-1)]=grid[4*k-1][4*(t-1)+2]="."
        grid[4*k][4*(t-1)]=grid[4*k][4*(t-1)+1]=grid[4*k][4*(t-1)+2]="."
        t+=1
print(n,n)
for i in grid:
    print("".join(i))

### FIXED CODE ###

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

grid=[["#"]*n for _ in range(n//2)]+[["."]*n for _ in range(n//2)]

k=0
cnt=0
for i in range(a-1):
    grid[k][2*i-cnt]="."
    if (2*i)%100==n-2:
        k+=2
        cnt+=n

k=n//2+1
cnt=0
for i in range(b-1):
    grid[k][2*i-cnt]="#"
    if (2*i)%100==n-2:
        k+=2
        cnt+=n
print(100,100)
for i in grid:
    print("".join(i))
a= map(int,input().split())
l=a.sort()
print(l[0]+l[1])

### FIXED CODE ###

a,b,c= map(int,input().split())
print(min([a+b,b+c,c+a]))
use std::io::stdin;
fn main() {
    let mut st = String::new();
    stdin().read_line(&mut st).unwrap();
    let s:Vec<char> = st.trim().chars().collect();
    let mut ten = 1;
    let mut c:usize = 0;
    let mut r:[i64;2020] = [0;2020];
    let m = s.len() as usize;
    for i in 1..m+1 {
        let mut x = s[m-i] as usize;
        x -= 48;
        c = (c+(x*ten)%2019)%2019;
        r[c] += 1;
        ten = (ten*10)%2019;
    };
    let mut result:i64 = 0;
    for i in 0..2019 {
        if &1 < &r[i] {
            result += (r[i]-1)*r[i]/2
        };
    };
    result += r[0];
    println!("{}", result);
}

### FIXED CODE ###

s = input()
x = list(map(int, list(s)))
x = x[::-1]
dic = [0 for _ in range(2020)]
ten = 1
y = 0
for i in range(len(s)):
    y = (y+ten*x[i])%2019
    dic[y] += 1
    ten = (ten*10)%2019
result = 0
for i in range(2019):
    result += max([dic[i]*(dic[i]-1)//2, 0])
result += dic[0]
print(result)
import sys
n = int(input())
ans = 10**12

for k in range(1,(n+1)**0.5):
    if n%k == 0 :
        m = n//k + k - 2
        if ans > m:
            ans = m
        else:
            print(ans)
            sys.exit()
print(ans)

### FIXED CODE ###

n = int(input())
ans = 10**12

for k in range(1,int((n)**0.5)+2):
    if n%k == 0 :
        m = n//k + k - 2
        if ans > m:
            ans = m
print(ans)
n, m = map(int, input().split())

s = [0] * m
c = [0] * m

for i in range(m):
    s[i], c[i] = map(int, input().split())

ans = False
for x in range(10 ** (n - 1), 10 ** n):
    x = list(str(x))
    flag = True
    for i in range(m):
        if int(x[s[i]-1]) == c[i]:
            pass
        else:
            flag = False

    if flag:
        print(int(''.join(x)))
        ans = True
        break

if n == 1:
    x = list(str(0))
        flag = True
    for i in range(m):
        if int(x[s[i]-1]) == c[i]:
            pass
        else:
            flag = False

    if flag:
        print(int(''.join(x)))
        ans = True
        break
    
if ans == False:
    print(-1)


### FIXED CODE ###

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

s = [0] * m
c = [0] * m

for i in range(m):
    s[i], c[i] = map(int, input().split())

ans = False

if n == 1:
    x = list(str(0))
    flag = True
    for i in range(m):
        if int(x[s[i]-1]) == c[i]:
            pass
        else:
            flag = False

    if flag:
        print(int(''.join(x)))
        ans = True
        
for x in range(10 ** (n - 1), 10 ** n):
    x = list(str(x))
    flag = True
    for i in range(m):
        if int(x[s[i]-1]) == c[i]:
            pass
        else:
            flag = False

    if flag and ans == False:
        print(int(''.join(x)))
        ans = True
        break


    
if ans == False:
    print(-1)
import sys
import fraction

dp = None
A = []

def lcm(a, b):
    return a * b // fraction.gcd(a, b)

def f(m):
    ans = 0
    for a in A:
        ans += m % a
    return ans

def main():
    global A

    N = int(input())
    A = [int(_) for _ in input().split()]

    lcmtemp = 1

    for a in A:
        lcmtemp = lcm(lcmtemp, a)

    print(f(lcmtemp-1))

main()


### FIXED CODE ###

import sys
import fractions

dp = None
A = []

def lcm(a, b):
    return a * b // fractions.gcd(a, b)

def f(m):
    ans = 0
    for a in A:
        ans += m % a
    return ans

def main():
    global A

    N = int(input())
    A = [int(_) for _ in input().split()]

    lcmtemp = 1

    for a in A:
        lcmtemp = lcm(lcmtemp, a)

    print(f(lcmtemp-1))

main()
class UnionFind:
    def __init__(self, n):
        self.group = list(range(n))
    
    def find(self, x):
        cv = self.group[x]
        if cv != x:
            self.group[x] = self.find(cv)
        return self.group[x]
    
    def union(self, x, y):
        self.group[self.find(x)] = self.find(y)

import itertools, operator, math
class Combination:
    def __init__(self, fact=math.factorial, div=operator.itruediv):
        self.fact = fact
        self.div = div
    def C(self, n, m):
        if n < m: return 0
        if m == 0 or n == m: return 1
        return self.div(
                self.fact(n),
                self.fact(n - m) * self.fact(m)
            )
    def H(self, n, r):
        return self.C(n - 1 + r, r)

N, M = map(int, input().split())
AB = [[int(x) for x in input().split()] for _ in range(M)]

uf = UnionFind(N + 1)
comb = Combination()

group_size = dict([(i, 1) for i in range(N+1)])
cur = comb.C(N, 2)
ans = [cur]
for a, b in reversed(AB):
    x = uf.find(a)
    y = uf.find(b)
    if x != y:
        uf.union(a, b)
        cur -= group_size[y] * group_size[x]
        group_size[y] += group_size[x]
        del group_size[x]

    ans.append(cur)
for n in reversed(ans[:-1]):
    print(int(n))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)

class UnionFind:
    def __init__(self, n):
        self.group = list(range(n))
    
    def find(self, x):
        cv = self.group[x]
        if cv != x:
            self.group[x] = self.find(cv)
        return self.group[x]
    
    def union(self, x, y):
        self.group[self.find(x)] = self.find(y)

N, M = map(int, input().split())
AB = [[int(x) for x in input().split()] for _ in range(M)]

uf = UnionFind(N + 1)
group_size = dict([(i, 1) for i in range(N+1)])
cur = N * (N-1) // 2
ans = [cur]
for a, b in reversed(AB):
    x = uf.find(a)
    y = uf.find(b)
    if x != y:
        cur -= group_size[y] * group_size[x]
        uf.union(a, b)
        group_size[y] += group_size[x]
        del group_size[x]
    ans.append(cur)

for n in reversed(ans[:-1]):
    print(n)
def inpl(): return list(map(int, sys.stdin.readline().split()))
n = int(sys.stdin.readline())
a = inpl()
count = 0
for i in range(n):
    for j in range(i+1, n):
        if a[i] + a[j] == j -i:
            count += 1
print(count)

### FIXED CODE ###

import sys
def inpl(): return list(map(int, sys.stdin.readline().split()))
n = int(sys.stdin.readline())
a = inpl()
dic ={}
res = 0
for i in range(n):
    res += dic.get(i - a[i], 0)
    dic[i + a[i]] = dic.get(i + a[i], 0) + 1

print(res)
n, x = list(map(int, input().split()))
m = []
for _ in range(n):
  m.append(int(input()))
sort(m)

def main():
  for i in range(n):
    if sum(m[0:i+1]) > x:
      print(i)
      return
  print(n)

main()

### FIXED CODE ###

n, x = list(map(int, input().split()))
m = []
for _ in range(n):
  m.append(int(input()))
m.sort()

def main():
  for i in range(n):
    if sum(m[0:i+1]) > x:
      print(i)
      return
  print(n)

if sum(m) > x:
  main()
else:
  print(n + (x - sum(m)) // m[0])
def main():
    a, b, k = map(int, input().split())

    line = list(range(a, b+1))
    n = len(line)
    for i in range(n):
        if i < k or n-k <= i:
            print(line[i])


if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    a, b, k = map(int, input().split())
    s = set()

    for i in range(a, min(a+k, b+1)):
        s.add(i)

    for i in range(b, max(a-1, b-k), -1):
        s.add(i)

    s = sorted(s)

    for i in s:
        print(i)


if __name__ == "__main__":
    main()
s, w = map(int, input().strip())

if s > w:
  print("safe")
else:
  print("unsafe")


### FIXED CODE ###

s, w = map(int, input().split())
if s > w:
  print("safe")
else:
  print("unsafe")
N,M = list(map(int,input().split()))
a = [int(input()) for i in range(M)]
dekai = 1000000007
 
def Fib(n):
	a,b = 0,1
	if n == 1:
		return a
	elif n == 2:
		return b
	else:
		for i in range(n-2):
			a,b = b,a+b
		return b


ans = 1
for i in range(M+1):
	if i == 0:
		ans = (ans*(Fib(a[0]-(-1))%dekai))%dekai
	elif i == M:
		ans = (ans*(Fib(N+1-a[M-1])%dekai))%dekai
	else:
		ans = (ans*(Fib(a[i]-a[i-1])%dekai))%dekai
print(ans)

### FIXED CODE ###

N,M = list(map(int,input().split()))
a = [int(input()) for i in range(M)]
dekai = 1000000007
"""
import sympy as sym

def Fib(n):
	x = sym.symbols('x',nonnegative=True,integer=True)
	Fib=1/sym.sqrt(5)*(((1+sym.sqrt(5))/2)**(n-1)-((1-sym.sqrt(5))/2)**(n-1))
	result=Fib.subs(x,n)
	result=result.evalf(int(n*3/14)+1)
	return int(result)


"""
def Fib(n):
	a,b = 0,1
	if n == 1:
		return a
	elif n == 2:
		return b
	else:
		for i in range(n-2):
			a,b = b,a+b
		return b
ans = 1

if M == 0:
	print(Fib(N+1-(-1))%dekai)
	exit()

for i in range(M+1):
	if i == 0:
		ans = (ans*(Fib(a[0]-(-1))%dekai))%dekai
	elif i == M:
		ans = (ans*(Fib(N+1-a[M-1])%dekai))%dekai
	else:
		ans = (ans*(Fib(a[i]-a[i-1])%dekai))%dekai
print(ans)
s = input()

alp = [0]*26
a_int = ord('a')

ans = -1
cand = []
if len(s) == 26:
    for i in reversed(range(1, 26)):
        if s[i] < s[i-1]:
            cand.append(s[i])
            continue
        else:
            cand = sorted(cand)
            print(cand)
            ans = s[0:i-1]+cand[0]
            break

else:
    for c in s:
        alp[ord(c)-a_int] = 1

    for i in range(26):
        if alp[i] == 0:
            ans = s+chr(i+a_int)
            break
print(ans)


### FIXED CODE ###

s = input()

alp = [0]*26
a_int = ord('a')

ans = -1
cand = []
if len(s) == 26:
    for i in reversed(range(1, 26)):
        if s[i] < s[i-1]:
            cand.append(s[i])
            continue
        else:
            cand.append(s[i])
            cand = sorted(cand, reverse=True)
            c = min(list(filter(lambda x: x > s[i-1], cand)))
            ans = s[0:i-1]+c
            break

else:
    for c in s:
        alp[ord(c)-a_int] = 1

    for i in range(26):
        if alp[i] == 0:
            ans = s+chr(i+a_int)
            break
print(ans)