Harryxun/stf_run huggingface dataset:
o = input()
e = input()
l = []
for i in range (len(o)):
  l.append(o[i])
  l.append(e[i])

s = ''.join(l)

print(s)

### FIXED CODE ###

o = list(input())
e = list(input())
i = 0
ans = ""
while i < len(e):
  ans += o[i]+e[i]
  i += 1
if len(o) > len(e):
  ans += o[len(o)-1]
print(ans)
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i])) for i in range(len(l))))

### FIXED CODE ###

n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))
A,B=map(int,input().split())
x=min(A,B)
y=max(A,B)
check=1
##x<=y
#####while break##############
if y%x==0:
    print(y)
root=round((x**(1/2)))
#print(root)
else:
    for i in range(2,root):
        if x%i==0 and y%i==0:
            x/=i
            y/=i
            check*=i 
       # print(check)
        i=2
    #print(x,y)
        root=round((x**(1/2)))
    print(int(check*x*y))

      

### FIXED CODE ###

A,B=map(int,input().split())
x=min(A,B)
y=max(A,B)
check=1
##x<=y
#####while break##############
if y%x==0:
    print(y)
#print(root)
else:
    #root=round((x**(1/2)))
    while True:
        through=0
        for i in range(2,int(x)):
            if x%i==0 and y%i==0:
                x/=i
                y/=i
                check*=i 
                through=1
                break
        if through==0:
            break
    print(int(check*x*y))
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:
    listb=[]
    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)
s=int(input())
l=[]
while(S not in 1):
  l.append(s)
  if s%2==0:s//=2
  else: s=s*3+1
print(len(l)+1)

### FIXED CODE ###

s=int(input())
l=[]
while(s not in l):
  l.append(s)
  if s%2==0:s//=2
  else:s=s*3+1
print(len(l)+1)
def main():
    n = int(input())
    v = list(map(int,input().split()))

    from collections import Counter
    a = Counter(v[::2]).most_common()
    b = Counter(v[1::2]).most_common()

    if a[0][0] != b[0][0]:
        print(n-(a[0][1]+b[0][1]))
    else:
        print(min(n-(a[1][1]+b[0][1]),n-(a[0][1]+b[1][1])))
 
if __name__ == '__main__':
    main()




### FIXED CODE ###

from collections import Counter
n=int(input())
v=list(map(int,input().split()))
a=Counter(v[0::2]).most_common()
b=Counter(v[1::2]).most_common()
a.append([0,0])
b.append([0,0])
if a[0][0]!=b[0][0]:
    print(n-(a[0][1]+b[0][1]))
else:
    print(min(n-(a[1][1]+b[0][1]),n-(a[0][1]+b[1][1])))
n,m=(map(int,input().split()))
l=list(map(int,input().split()))

l=sorted(l,reverse=True)

l_sum=sum(l)
ans="Yes"

for i in range(m):
  if l[m]<(l_sum*1/4/m):
    ans="No"
    break
    
print(ans)

### FIXED CODE ###

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

l=sorted(l,reverse=True)

l_sum=sum(l)
ans="Yes"

if l[m-1]<(l_sum/4/m):
  ans="No"
    
print(ans)
import sys
input = sys.stdin.readline
def gdc(p, q):
    if q <= 0:
        return p
    p -= q
    return gdc(max(p,q), min(p,q))

def main():
    N = int(input())
    A = list(map(int, input().split()))
    A_sorted = sorted(A)
    print(gdc(A[1], A[0]))


if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
input = sys.stdin.readline
def gdc(p, q):
    if q == 0:
        return p
    return gdc(q, p%q)

def main():
    N = int(input())
    A = list(map(int, input().split()))
    if N == 1:
        print(A[0])
        return
    res = A[0]
    for i in range(1,N):
        res = gdc(res, A[i])
    print(res)

if __name__ == '__main__':
    main()
N = int(input())
P = [int(input().split()) for i in range(len(N))]
Q = [int(input().split()) for i in range(len(N))]

data = [i+1 for i in range(N)]

def listExcludedIndices(data, indices=[]):
  return [x for i, x in enumerate(data) if i not in indices]

def count(res,p):
    count = 0
    for i in range(len(res)):
        count +=1
        if res[i] == p:
            break
    return count

result = []
for i in range(len(data)):
  for j in range(len(data)-1):
    for k in range(len(data)-2):
      jData = listExcludedIndices(data, [i])
      kData = listExcludedIndices(jData, [j])
      result.append([data[i], jData[j], kData[k]])
print(abs(count(result,P) - count(result,Q)))

### FIXED CODE ###

N = int(input())
P = tuple(int(x) for x in input().split())
Q = tuple(int(x) for x in input().split())

import itertools
L = list(itertools.permutations(list(range(1,N+1))))
print(abs(L.index(Q) - L.index(P)))
import math
sys.setrecursionlimit(10**9)

def main():
    S = input()
    T = input()

    if S == T[:-1] and len(T) == 1 + len(S):
        print("Yes")
        exit()

    print("No")




if __name__ == "__main__":
  main()


### FIXED CODE ###

import sys
import math
sys.setrecursionlimit(10**9)

def main():
    S = input()
    T = input()

    if S == T[:-1] and len(T) == 1 + len(S):
        print("Yes")
        exit()

    print("No")




if __name__ == "__main__":
  main()
a,b,c = map(str,input().split(,))
print(a,b,c)

### FIXED CODE ###

s = input()
a = s[0]+s[1]+s[2]+s[3]+s[4]
b = s[6]+s[7]+s[8]+s[9]+s[10]+s[11]+s[12]
c = s[14]+s[15]+s[16]+s[17]+s[18]
print(a,b,c)
a, b = input().split()
a = int(a)
b = int(b)
print('Even' if a * b % == 0 else 'Odd')

### FIXED CODE ###

a, b = input().split()
a = int(a)
b = int(b)
print('Even' if a * b % 2 == 0 else 'Odd')
count = 1
while True:
    x = input().strip()
    if x == '0':
        break
    else:
        print( 'Case {0}: {1}'.format( i, x))
        count += 1

### FIXED CODE ###

count = 1
while True:
    x = input().strip()
    if x == '0':
        break
    else:
        print( 'Case %s: %s' % ( count, x))
        count += 1
import sys
import math

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prl = lambda x: print(*x ,sep='\n')

a,b = input().split(' ')
a = int(a)
b = float(b)
t = int(b * 100)
res = 0
for i in range(3):
    res += int(str(t)[i]) * a // (10 ** i)
print(int(res))

### FIXED CODE ###

import sys
import math

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prl = lambda x: print(*x ,sep='\n')

a,b = input().split(' ')
ash_1 = int(a[-1])
ash_2 = int(a[-2:])
bsh_1 = int(b[-2])
bsh_2 = int(b[-1])
bsh_0 = int(b[0])
kuri = (ash_1*bsh_1*10 + ash_2*bsh_2) //100
if len(a) == 1:
    res = int(a)*bsh_0 + kuri
elif len(a) == 2:
    a1 = a[:-1]
    res = int(a)*bsh_0 + int(a1)*bsh_1 + kuri
else:
    a1 = a[:-1]
    a2 = a[:-2]
    res = int(a)*bsh_0 + int(a1)*bsh_1 + int(a2)*bsh_2 + kuri
print(res)
import collections
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
c = collections.Counter(a)
print(c.most_common()[1])

### FIXED CODE ###

import bisect
import collections
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
m = collections.deque([])
for i in range(0, n):
    j = bisect.bisect_left(m, a[i])
    if j == 0:
        m.appendleft(a[i])
    else:
        m[j - 1] = a[i]
print(len(m))
cnt = input()
li = map(int,input().split())
re_li = li[::-1]
print(re_li)



### FIXED CODE ###

cnt = int(input())
li = list(map(int,input().split()))
re_li = li[::-1]
print(' '.join(map(str,re_li)))
import math
A, B = map(int, input().split())
print(math.floor(A*B))

### FIXED CODE ###

def resolve():
    A, B = input().split()
    ans = int(A)*int(B[0])*100+int(A)*int(B[2:])
    print(str(ans)[:-2] if len(str(ans)) >= 3 else "0")
resolve()
import fractions


def GCD(a, b):
    if b == 0:
        return a
    else:
        return GCD(b, a % b)


N = int(input())
clock = [0]*N
gcd = int(input())
clock[0] = gcd
ans = clock[0]
for i in range(1, N):
    clock[i] = int(input())
    gcd = GCD(ans, clock[i])
    ans = ans/gcd
    ans *= clock[i]

print(int(ans))


### FIXED CODE ###

import fractions


def GCD(a, b):
    if b == 0:
        return a
    else:
        return GCD(b, a % b)


N = int(input())
clock = [0] * N
for j in range(N):
    clock[j] = int(input())
gcd = clock[0]

ans = clock[0]
for i in range(1, N):
    gcd = GCD(ans, clock[i])
    ans = ans//gcd
    ans = ans * clock[i]

print(int(ans))
import bisect
a,b,q=map(int,input().split())
s=[int(input())for i in range(a)]
t=[int(input())for i in range(b)]
for i in range(q):
    x=int(input())
    c=bisect.bisect_left(s,x)
    d=bisect.bisect_left(t,x)
    p=[]
    if c!=a and d!=b:
        p.append(min(abs(s[c]-x),abs(t[d]-x)))
    if c!=0 and d!=0:
        p.append(min(abs(s[c-1]-x),abs(t[d-1]-x)))
    if c!=a and d!=0:
        p.append(min(abs(s[c]-x)*2+abs(t[d-1]-x),abs(s[c]-x)+2*abs(t[d-1]-x)))
    if c!=0 and d!=b
        p.append(min(abs(s[c-1]-x)*2+abs(t[d]-x),abs(s[c-1]-x)+2*abs(t[d]-x)))
    print(min(p))

### FIXED CODE ###

import bisect
a,b,q=map(int,input().split())
s=[int(input())for i in range(a)]
t=[int(input())for i in range(b)]
for i in range(q):
    x=int(input())
    c=bisect.bisect_left(s,x)
    d=bisect.bisect_left(t,x)
    p=[]
    if c!=a and d!=b:
        p.append(max(abs(s[c]-x),abs(t[d]-x)))
    if c!=0 and d!=0:
        p.append(max(abs(s[c-1]-x),abs(t[d-1]-x)))
    if c!=a and d!=0:
        p.append(min(abs(s[c]-x)*2+abs(t[d-1]-x),abs(s[c]-x)+2*abs(t[d-1]-x)))
    if c!=0 and d!=b:
        p.append(min(abs(s[c-1]-x)*2+abs(t[d]-x),abs(s[c-1]-x)+2*abs(t[d]-x)))
    print(min(p))
N, M = map(int, input().split())
EdgeTo = [[] for _ in range(N)]

for _ in range(M):
    x, y = map(int, input().split())
    EdgeTo[x-1].append(y-1)


DP = [-1] * N
def From(i, EdgeTo, DP):
    if DP[i] >= 0: return DP[i]
    else:
        maxLength = 0
        if not EdgeTo[i]:
            DP[i] = maxLength
        else:
            for node in EdgeTo[i]:
                maxLength = max(maxLength, From(node, EdgeTo, DP))
            maxLength += 1
        DP[i] = maxLength
        return maxLength
Ans = 0
for i in range(N):
    Ans = max(Ans, From(i, EdgeTo, DP))
print(Ans)

### FIXED CODE ###

import sys

N, M = map(int, input().split())
EdgeTo = [[] for _ in range(N)]
sys.setrecursionlimit(N+M)

for _ in range(M):
    x, y = map(int, input().split())
    EdgeTo[x-1].append(y-1)


DP = [-1] * N
def From(i):
    if DP[i] != -1: return DP[i]
    else:
        maxLength = 0
        if not EdgeTo[i]:
            DP[i] = maxLength
        else:
            for node in EdgeTo[i]:
                maxLength = max(maxLength, 1 + From(node))
            DP[i] = maxLength
        return maxLength

Ans = 0
for i in range(N):
    Ans = max(Ans, From(i))
print(Ans)
N = int(input())
INF = 10 ** 14
edges = [[] for _ in range(N)]
for _ in range(N-1):
    a, b, c = map(int,input().split())
    edges[a-1].append((b-1, c))
    edges[b-1].append((a-1, c))

Q, K = map(int,input().split())
d = [INF] * N
d[K-1] = 0

def dfs(x):
    for u, cost in edges[x]:
        if d[u] == INF:
            d[u] = d[x] + cost
            dfs(u)

dfs(K-1)

for _ in range(Q):
    x, y = map(int,input().split())
    ans = d[x-1] + d[y-1]
    print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(4100000)

N = int(input())
INF = 10 ** 14
edges = [[] for _ in range(N)]
for _ in range(N-1):
    a, b, c = map(int,input().split())
    edges[a-1].append((b-1, c))
    edges[b-1].append((a-1, c))

Q, K = map(int,input().split())
d = [INF] * N
d[K-1] = 0

def dfs(x):
    for u, cost in edges[x]:
        if d[u] == INF:
            d[u] = d[x] + cost
            dfs(u)

dfs(K-1)

for _ in range(Q):
    x, y = map(int,input().split())
    ans = d[x-1] + d[y-1]
    print(ans)
a, b, c = map(int, input().split())
print("bust" a + b + c >= 22 else "win")

### FIXED CODE ###

a, b, c = map(int, input().split())
print("bust" if a + b + c >= 22 else "win")
a = map(int, input.split())
a = sorted(a)
ans = 0
ans += a[1] - a[0]
ans += a[2] - a[1]
print(ans)

### FIXED CODE ###

a = map(int, input().split())
a = sorted(a)
ans = 0
ans += a[1] - a[0]
ans += a[2] - a[1]
print(ans)
s = input()
K = int(input())

sArr = list(s)
endpoint = len(sArr) - 1
result = ""

for i in range(len(sArr)):
    if ord("z") - ord(sArr[i]) + 1 <= K:
        K -= ord("z") - ord(sArr[i]) + 1
        sArr[i] = "a"

while K > 0:
    if ord("z") - ord(sArr[endpoint]) >= K:
        sArr[endpoint] = chr(ord(sArr[endpoint]) + K)
        K = 0
    else:
        sArr[endpoint] = "z"
        K -= ord("z") - ord(sArr[endpoint])
        endpoint -= 1
    if endpoint == 0 and K != 0:
        while endpoint != len(s) - 1:
            sArr[endpoint] = "a"
            K -= 1

for j in range(len(sArr)):
    result += sArr[j]

print(result)

### FIXED CODE ###

s = input()
K = int(input())

sArr = list(s)
endpoint = len(sArr) - 1
result = ""

for i in range(len(sArr)):
    if K == 0:
        break
    else:
        if (123 - ord(sArr[i])) <= K:
            K -= (123 - ord(sArr[i])) % 26
            sArr[i] = "a"

if K > 0:
    K %= 26
    sArr[endpoint] = chr(ord(sArr[endpoint]) + K)

for j in range(len(sArr)):
    result += sArr[j]

print(result)
int A = input()
int B = input()

print(int((3*A+B)/2))

### FIXED CODE ###

A, P = map(int, input().split())

print((3*A+P)//2)
import numpy as np
H,W,K = map(int,input().split())
c = [input().split() for l in range(H)]

c1 = c.count("#")

num = 0
while c1 > K:
  for i in range(H,W)
  c = np.delete(c, H, W)
  num += 1
  
print(num)
  

### FIXED CODE ###

H, W, K = list(map(int, input().split()))
 
c = [list(input()) for i in range(H)]
 
cnt = 0
for i in range(2**H):
    for j in range(2**W):
        cnt_black = 0
        for k in range(H):
            if (i >> k) & 1:
                continue
            for l in range(W):
                if (j >> l) & 1:
                    continue
                if c[k][l] == '#':
                    cnt_black += 1
        if cnt_black == K:
            cnt += 1
 
print(cnt)
# -*- coding: utf-8 -*-
import sys
from math import sqrt,floor
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    X = int(lines.pop(0))
    s = floor(sqrt(X))
    res = 1
    for c in range(s, 1, -1):
        print(c)
        while( c**n <= X ):
            res = max(res, c**n)
            n += 1

    print(res)
#
# main
#
lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
from math import sqrt,floor
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    X = int(lines.pop(0))
    s = floor(sqrt(X))
    res = 1
    for c in range(s, 1, -1):
        n = 2
        while( c**n <= X ):
            res = max(res, c**n)
            n += 1

    print(res)
#
# main
#
lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)
#!/usr/bin/env python
# coding: utf-8

# In[8]:


P = int(input())


# In[10]:


i_list = list(range(1, P+1))
p_list = i_list[1:]
p_list.append(i_list[0])

# print(i_list, p_list)

ans = 0
for i in range(P):
    ans += i_list[i]%p_list[i]
print(ans)


# In[ ]:






### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[21]:


P = int(input())


# In[22]:


# i_list = list(range(1, P+1))
# p_list = i_list[1:]
# p_list.append(i_list[0])

# # print(i_list, p_list)

# ans = 0
# for i in range(P):
#     ans += i_list[i]%p_list[i]
# print(ans)

# ans = sum(range(1,P))
ans = P*(P-1)//2
print(ans)


# In[ ]:
N,M=map(int,input().split())
a=list(map(int,input().split()))

import fractions
from functools import reduce

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

l=lcm_list(a)/2

print((M//l+1)//2)


### FIXED CODE ###

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

import fractions
from functools import reduce

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

l=lcm_list(a)

for s,t in enumerate(a):
    if (l//t)%2==0:
      print("0")
      exit()

print((2*M//l+1)//2)
# -*- coding: utf-8 -*-
import math

if __name__ == '__main__':
    N = int(input())
    val = len(N)
    li = []
    for i in range(1, math.ceil(math.sqrt(N))+1):
        if N % i == 0:
            a = len(str(int(i)))
            b = len(str(int(N/i)))
            print(a, b)
            c = max(a, b)

            if c < val:
                val = c

    print(val)



### FIXED CODE ###

# -*- coding: utf-8 -*-
import math

if __name__ == '__main__':
    N = int(input())
    val = len(str(N))
    li = []
    for i in range(1, math.ceil(math.sqrt(N))+1):
        if N % i == 0:
            a = len(str(int(i)))
            b = len(str(int(N/i)))
            c = max(a, b)

            if c < val:
                val = c

    print(val)
a,b = int(inout().split())

print(int((a + b) / 2))


### FIXED CODE ###

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

if (a + b) % 2 == 0:
  print(int((a + b)/2))
  
else:
  print(int((a + b) // 2) +1)
N, M = map(int, input().split())
if N == 1:
    print(1)
else:
    A = [int(input()) for _ in range(M)]

    S =[0]*(N + 1)
    S[0] = 1
    if A[0] == 1:
        S[1] = 0
    else:
        S[1] = 1

    for i in range(2, N+1):
        if i in A:
            S[i] = 0
        else:
            S[i] = (S[i-1] + S[i-2]) % 1000000007
            print(S[N])


### FIXED CODE ###

N, M = map(int, input().split())
A = set()
for _ in range(M):
    A.add(int(input()))
p = 10 ** 9 + 7
DP = [0 for _ in range(N + 1)]
DP[0] = 1
if 1 in A:
    DP[1] = 0
else: DP[1] = 1
for i in range(2, N+1):
    if i in A:
        DP[i] = 0
    else:
        DP[i] = (DP[i-1] + DP[i-2])%p
print(DP[N])
N, M = map(int, input().split())
xyz = [list(map(int, input().split())) for _ in range(N)]


def cake(i, used, x, y, z):
    if i <= N and used >= M:
        return abs(x) + abs(y) + abs(z)
    if i >= N:
        return 0
    r = cake(i+1, used, x, y, z)
    r = max(r, cake(i+1, used+1, x+xyz[i][0], y+xyz[i][1], z+xyz[i][2]))
    return r


ans = cake(0, 0, 0, 0, 0)
print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
xyz = []
ans = 0
for _ in range(N):
    xyz += [list(map(int, input().split()))]
for b in range(2 ** 3):
    pm = [1] * 3
    for j in range(3):
        if (b >> j) & 1:
            pm[j] *= -1
    r = []
    for i in range(N):
        r += [pm[0] * xyz[i][0] + pm[1] * xyz[i][1] + pm[2] * xyz[i][2]]
    r.sort(reverse=True)
    ans = max(ans, sum(r[:M]))
print(ans)
import math
from math import factorial
N,K=map(int, input().split()) 
lst=[]

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1, K+1):
    lst.append((combinations_count(N-K+1, i)) * (combinations_count(K-i+(i-1), i-1)))
        
for i in range(K):
    print(lst[i]%(10**9+7))

### FIXED CODE ###

import math
n,k=map(int,input().split()) 

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

mod_num = 10 ** 9 + 7
for i in range(1, k+1):
    if i > n - k + 1:
        print(0)
    else:
        print(comb(n-k+1, i) * comb(k-i+(i-1), i-1) % mod_num)
import sys

def get_minimun_val(n, rule_dict):
  max_val = 10**n
  min_val = 10**(n-1)
  if min_val = 1:
    min_val=0
  for i in range(min_val, max_val):
    str_i = str(i)
    flg = True
    for s, c in rule_dict.items():
      if str_i[s-1] == str(c):
        continue
      else:
        flg = False
        break
    if flg:
      return i
  return -1


rule_dict = {}

n, m = map(int, input().split())
res = -1
for i in range(m):
  s, c = map(int, input().split())
  if c == 0 and s == 1 and n > 1:
    print(-1)
    sys.exit()
  if s not in rule_dict:
    rule_dict[s] = c
    continue
  current_c = rule_dict[s]
  if c != current_c:
    print(-1)
    sys.exit()

print(get_minimun_val(n, rule_dict))


### FIXED CODE ###

import sys

def get_minimun_val(n, rule_dict):
  max_val = 10**n
  min_val = 10**(n-1)
  if min_val == 1:
    min_val=0
  for i in range(min_val, max_val):
    str_i = str(i)
    flg = True
    for s, c in rule_dict.items():
      if str_i[s-1] == str(c):
        continue
      else:
        flg = False
        break
    if flg:
      return i
  return -1


rule_dict = {}

n, m = map(int, input().split())
res = -1
for i in range(m):
  s, c = map(int, input().split())
  if c == 0 and s == 1 and n > 1:
    print(-1)
    sys.exit()
  if s not in rule_dict:
    rule_dict[s] = c
    continue
  current_c = rule_dict[s]
  if c != current_c:
    print(-1)
    sys.exit()

print(get_minimun_val(n, rule_dict))
rom collections import deque

s = input()
q = int(input())

t = deque(s)

reverse = False
for _ in range(q):
   query = input()
   if query[0] == '1':
      reverse = not reverse
   elif query[0] == '2':
      _, f, c = query.split()
      if f == '1':
         if reverse:
            t.append(c)
         else:
            t.appendleft(c)
      elif f == '2':
         if reverse:
            t.appendleft(c)
         else:
            t.append(c)

result = ''.join(t)
if reverse:
   result = result[::-1]
print(result)


### FIXED CODE ###

from collections import deque

s = input()
q = int(input())

t = deque(s)

reverse = False
for _ in range(q):
   query = input()
   if query[0] == '1':
      reverse = not reverse
   elif query[0] == '2':
      _, f, c = query.split()
      if f == '1':
         if reverse:
            t.append(c)
         else:
            t.appendleft(c)
      elif f == '2':
         if reverse:
            t.appendleft(c)
         else:
            t.append(c)

result = ''.join(t)
if reverse:
   result = result[::-1]
print(result)
a=input().split()
x=0
for n in a:
  x+=1
  if n=0:
    aa=x
print(aa)

### FIXED CODE ###

a=input().split()
x=0
for n in a:
  x+=1
  if n=="0":
    aa=x
print(aa)
def main():
    import sympy
    n = int(input())
    s = 0
    
    for i in range(1,n+1):
        s += i * len(sympy.divisors(i))
    print(s)

main()

### FIXED CODE ###

def main():
    n = int(input())
    ans = 0
    for i in range(1,n+1):
        #print(range(i,n+1,i),sum(range(i,n+1,i)))
        ans += sum(range(i,n+1,i))

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

DP = [-1 for i in range(N+1)]
stair = [0 for i in range(N+1)]
DP[0] = DP[1] = 1
stair[0] = stair[1] = 1
MOD = 10**9 + 7

for i in range(M):
    index = int(input())
    stair[index] = 0
    DP[index] = 0

def DP_top_down(num):

    if (DP[num] == 0): # broken
        return(0)

    elif (DP[num] == 1): # done
        answer = stair[num]
    
    else:
        answer = DP_top_down(num-2) + DP_top_down(num-1)
        stair[num] = answer # I forgot this operation!
        DP[num] = 1        

    return(answer)

answer = DP_top_down(N)
print(answer%MOD)

### FIXED CODE ###

N, M = map(int, input().split())
DP = [1 for i in range(N+1)]
MOD = 10**9 + 7

for i in range(M):
    DP[int(input())] = 0

for i in range(2,N+1):
    
    if (DP[i] != 0):
        DP[i] = DP[i-1] + DP[i-2]
print(DP[N]%MOD)
a = list(map(int,input().split()))
print(a + b/2)

### FIXED CODE ###

a = list(map(int,input().split()))
print(a[0] + int(a[1]/2))
N,A,B =map(int,input().split())
print(sum(i for i in range(n+1) if A <= sum(map(int,str(i))) <= B))

### FIXED CODE ###

N,A,B =map(int,input().split())
print(sum(i for i in range(N+1) if A <= sum(map(int,str(i))) <= B))