Harryxun/stf_run huggingface dataset:
t=list(map(int,input().split()))
s=list(map(int,input().split()))
def gcd(x,y):
  if y==0:
    return(x)
  else:
    return gcd(y,x%y)
  
a=gcd(s[0],s[1])
b=gcd(s[0],s[2])
c=gcd(s[1],s[2])
if a<b:
  if b<c:
    print(c)
  else:
    print(b)
else:
  if a<c:
    print(c)
  else:
    print(a)

### FIXED CODE ###

def main():
    import sys
    from fractions import gcd
    input=sys.stdin.readline
    n=int(input())
    a=tuple(map(int,input().split()))
    ide_ele=0
    num=2**(n-1).bit_length()
    seg=[ide_ele]*2*num
    def init(init_val):
        for i in range(n):
            seg[i+num-1]=init_val[i]
        for i in range(num-2,-1,-1):
            seg[i]=gcd(seg[2*i+1],seg[2*i+2])
    
    def update(k,x):
        k+=num-1
        seg[k]=x
        while k:
            k=(k-1)//2
            seg[k]=gcd(seg[k*2+1],seg[k*2+2])
    
    def query(p,q):
        if q<=p:
            return ide_ele
        p+=num-1
        q+=num-2
        res=ide_ele
        while q-p>1:
            if p&1==0:
                res=gcd(res,seg[p])
            if q&1==1:
                res=gcd(res,seg[q])
                q-=1
            p=p//2
            q=(q-1)//2
        if p==q:
            res=gcd(res,seg[p])
        else:
            res=gcd(gcd(res,seg[p]),seg[q])       
        return res

    init(a)
    ans=-1
    for i in range(n):
        ans=max(ans,gcd(query(0,i),query(i+1,n)))
    print(ans)
main()
from itertools import tee
N = int(input())
w0, w1 = tee((int(input()) for _ in range(N)), 2)
next(w1)
for a,b in zip(w0,w1):
  if a[-1] != b[0]:
    print('No')
    break
else:
  print('Yes')

### FIXED CODE ###

from itertools import tee
N = int(input())
w0, w1 = tee((input() for _ in range(N)), 2)

words = {next(w1)}
flag = 'Yes'
for a,b in zip(w0,w1):
  if a[-1] != b[0] or b in words:
    flag = 'No'
  words.add(b)

print(flag)
n = int(inupt())
s = [0, 0, 0]

for i in range(n):
  l = map(int, input().split())
  diff_t = l[0] - s[0]
  diff_x = abs(s[1] - l[1])
  diff_y = abs(s[2] - l[2])
  if diff_x + diff_y > diff_t or (diff_t - diff_x - diff_y) % 2 != 0:
    print('No')
    break
else:
  print('Yes')

### FIXED CODE ###

n = int(input())
s = [0, 0, 0]
ans = 'Yes'
for i in range(n):
  l = list(map(int, input().split()))
  diff_t = l[0] - s[0]
  diff_x = abs(s[1] - l[1])
  diff_y = abs(s[2] - l[2])
  s = [l[0], l[1], l[2]]
  if diff_x + diff_y > diff_t or (diff_t - diff_x - diff_y) % 2 != 0:
    ans = 'No'
print(ans)
a = input()
b = input()
if(a > b):
    print("GREATER")
elif(a < b):
    print("LESS")
elif(a == b):
    print("EQUAL")


### FIXED CODE ###

inp = input()
split = inp.split()
out = ""
for s in split:
    out += s[0].upper()
print(out)
k,n=map(int,input().split())
if(n==0):
    print(k)
else:
  l=sorted(list(map(int,input().split())))
  a=[]
  a.append(k)
  for i in range(1,n-1):
    a.append(k-i)
    a.append(k+i)
  if(n%2==0):
    a.pop(-1)
  for i in range(n):
    if(l[i] in a):
        continue
    else:
         if(i!=n-1):
             print(min(a[i],a[i+1]))
             break
         else:
             print(a[i])
             break

### FIXED CODE ###

k,n=map(int,input().split())
if(n==0):
    print(k)
else:
  l=list(map(int,input().split()))
  c=1
  d=0
  if(k not in l):
      print(k)
  else:  
      while(d==0):
        if(k-c not in l):
           print(k-c)
           break
        if(k+c not in l):
           print(k+c)
           break
        c=c+1
n, a, b = map(int, input().split())
blue='b'*a
red='r'*b
s = str(blue+red)*n
ss=s[:n]
print(ss.count('b'))

### FIXED CODE ###

n, a, b = map(int, input().split())
c = n//(a+b)
ans = c*a+min(n%(a+b), a)
print(ans)
import sys, io, os, re
import bisect
from pprint import pprint
from math import sin, cos, pi, radians, sqrt
from copy import copy, deepcopy
from collections import deque
from fractions import gcd
from functools import reduce

def array1(n): return [0] * n
def array2(n, m): return [[0] * m for x in range(n)]
def array3(n, m, l): return [[[0] * l for y in xrange(m)] for x in xrange(n)]

a = sys.stdin.readline().strip()
arr = map(int, sys.stdin.readline().strip().split())
mod = 10**18

ans = arr[0]
for i in range(1, len(arr)):
    ans *= arr[i]
    if ans > mod:
        ans = -1
        break

print(ans)


### FIXED CODE ###

import sys, io, os, re
import bisect
from pprint import pprint
from math import sin, cos, pi, radians, sqrt
from copy import copy, deepcopy
from collections import deque
from fractions import gcd
from functools import reduce

def array1(n): return [0] * n
def array2(n, m): return [[0] * m for x in range(n)]
def array3(n, m, l): return [[[0] * l for y in xrange(m)] for x in xrange(n)]

a = sys.stdin.readline().strip()
arr = list(map(int, sys.stdin.readline().strip().split()))
mod = 10**18

ans = arr[0]
for i in range(1, len(arr)):
    ans *= arr[i]
    if ans > mod:
        ans = -1
        break

if 0 in arr:
    ans = 0

print(ans)
n=int(input().split())
ans=s[0]+t[0]
s,t=input().split()
for i in range(1,n):
    ans=ans+s[i]+t[i]
print(ans)

### FIXED CODE ###

n=int(input())
s,t=input().split()
ans=s[0]+t[0]
for i in range(1,n):
    ans=ans+s[i]+t[i]
print(ans)
a,b = map(int, input().split())
print(max({a+b,a-b,a*b})

### FIXED CODE ###

a, b = map(int, input().split())
print(max({a+b,a-b,a*b}))
s = input()
q = int(input())
cnt = 0
for i in range(q):
    t_f_c = list(input().split())
    #反転する=先末逆転
    if t_f_c[0] == "1":
        cnt  += 1
    #反転しない
    elif t_f_c[0] == "2":
        if cnt % 2 == 0:
            if t_f_c[1] == "1":
                s = t_f_c[2] + s
            elif t_f_c[1] == "2":
                s = s + t_f_c[2]
        elif cnt % 2 == 1:
            if t_f_c[1] == "1":
                s = s + t_f_c[2]
            elif t_f_c[1] == "2":
                s = t_f_c[2] + s
if cnt % 2 == 0:
    print(s)
elif cnt % 2 == 1:
    print("".join((list(s)).reverse()))

### FIXED CODE ###

from collections import deque
s = deque(input())
q = int(input())

cnt = 1
for i in range(q):
    t_f_c = list(input().split())
    if t_f_c[0] == "1":
        cnt *= -1
    elif t_f_c[0] == "2":
        if cnt == 1: #反転-
            if t_f_c[1] == "1":
                s.appendleft(t_f_c[2])
            elif t_f_c[1] == "2":
                s.append(t_f_c[2])
        elif cnt == -1:  #反転+
             if t_f_c[1] == "2":
                s.appendleft(t_f_c[2])
             elif t_f_c[1] == "1":
                s.append(t_f_c[2])
if cnt == 1:
    print("".join(s))
elif cnt == -1:
    s.reverse()
    print("".join(s))
from collections import Counter as counter

N = int(input())
char_counts = [counter(input()) for i in range(N)]
match_count = 0
for i, c in enumerate(char_counts):
  for j in range(i+1, N, 1):
    if char_counts[j] == c:
      match_count += 1
print(match_count)

### FIXED CODE ###

A, B = list(map(int, input().split()))
plus = A + B
minus = A - B
times = A * B
results = [plus, minus, times]
max_val = -float('inf')
for r in results:
  if r > max_val:
    max_val = r
print(max_val)
from math import gcd
N=int(input())
a=list(map(int,input().split()))

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

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

ans=0
for i in range(N):
    if i==0: tmp=r[1]
    elif i==N-1: tmp=l[N-2]
    else: tmp=gcd(l[i-1],r[i+1])
    ans=max(tmp,ans)

print(ans)

### FIXED CODE ###

def egcd(a, b):
    (x, lastx) = (0, 1)
    (y, lasty) = (1, 0)
    while b != 0:
        q = a // b
        (a, b) = (b, a % b)
        (x, lastx) = (lastx - q * x, x)
        (y, lasty) = (lasty - q * y, y)
    return a

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

l=[0]*N
l[0]=a[0]

for i in range(1,N):
    l[i]=egcd(l[i-1],a[i])

r=[0]*N
r[N-1]=a[N-1]
for i in range(N-2,-1,-1):
    r[i]=egcd(r[i+1],a[i])

ans=0
for i in range(N):
    if i==0: tmp=r[1]
    elif i==N-1: tmp=l[N-2]
    else: tmp=egcd(l[i-1],r[i+1])
    ans=max(tmp,ans)

print(ans)
(n, k) = [int(x) for x in input().split()]
banig = []
for x in range(n):
  banig.append(int(input()))
banig.sort()

difBanig = []
for mini, maxi in zip(range(0,n-k+1), range(n-k,n+1)):
  difBanig.append(banig[maxi] - banig[mini])
print(max(difBanig))

### FIXED CODE ###

(n, k) = [int(x) for x in input().split()]
banig = []
for x in range(n):
  banig.append(int(input()))
banig.sort()

difBanig = []
for bot in range(n-k+1):
  difBanig.append(banig[bot+k-1] - banig[bot])

print(min(difBanig))
n=int(input())
h=[int(i) for i in input().split()]

dp=[10000 for i in range(n+1)]
dp[0]=0
for i in range(n-1):
    dp[i+1]=min(dp[i+1],dp[i]+abs(h[i]-h[i+1]))
    dp[i+2]=min(dp[i+2],dp[i]+abs(h[i]-h[i+2]))
print(dp[n-1])

### FIXED CODE ###

n=int(input())
h=[int(i) for i in input().split()]
dp=[0,abs(h[1]-h[0])]

for ind in range(2,len(h)):
    a=abs(h[ind-1]-h[ind])
    b=abs(h[ind-2]-h[ind])
    if(a+dp[ind-1]>b+dp[ind-2]):
        dp.append(b+dp[ind-2])
    else:
        dp.append(a+dp[ind-1])
print(dp[len(dp)-1])
a=[]
while True:
 n=input()
 if n=='0 ? 0':break
 a.append(n)
for s in a:
 t=s.split()
 if t[1]=='/':
  print(t[0]//t[2])
 else:
  b=eval(''.join(t))
  print(b)

### FIXED CODE ###

while 1:
 a=input()
 if'?'in a:break
 print(int(eval(a)))
n = input()

def f(s):
    if int(s) > int(n):
        return 0
    if all(['3' in s,'5' in s,'7' in s]):
        ans += 1
    for t in '3','5','7':
        f(s+t)

ans = 0
f('0')
print(ans)


### FIXED CODE ###

n = input()

def f(s):
    if int(s) > int(n):
        return 0
    if all(['3' in s,'5' in s,'7' in s]):
        ans.append(1)
    for t in '3','5','7':
        f(s+t)

ans=[]
f('0')
print(sum(ans))
a = int(input())
s = input()

if 3200 <= a <= 5000:
    print(input(s))
if 2800 <= a <3200:
    print("red")

### FIXED CODE ###

a = int(input())
s = input()

if 3200 <= a:
    print(s)
if a < 3200:
    print("red")
N=int(input())
ans=0
for i in range(N):
    l,r=map(int,input().split())
    ans=ans+l-r+1
print(ans)


### FIXED CODE ###

N=int(input())
if N//10==9 or N%10==9:
    print("Yes")
else:
    print("No")
N = map(int,input().split())

fx = sum(list(map(int,str(N))))

if N % fx == 0:
print("Yes")
else:
print("No")

### FIXED CODE ###

N = int(input())
f = sum(map(int,list(str(N))))

if N % f == 0:
        print("Yes")
else:
        print("No")
h , w = map(int, input().split())
c = 0
if h == 1 or w ==1:
	print(1)
	exit()
 
if w % 2 == 0:
	print(h * w // 2)
	exit()
elif w % 2 == 1:
	if h % 2 == 0:
		print(h * w // 2)
		exit()
	elif h % 2 == 1:
		print((h * w // 2) + 1)
		exit()

### 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])
import numpy as np
n = int(input())
d = list(map(int,input().split()))
print(int((np.sum(np.array(d))**2 - np.sum(np.array(d)**2)) /

### FIXED CODE ###

import numpy as np
n = int(input())
d = list(map(int,input().split()))
print(int((np.sum(np.array(d))**2 - np.sum(np.array(d)**2)) /2))
import itertools

def ij(m):
    return m[0] < m[1]

def main():
    (l, r) = list(map(int, input().split()))

    min = 2018
    for (i, j) in filter(ij, itertools.product(range(l, r + 1), range(l, r + 1))):
        mod = i * j % 2019
        if mod <= min:
            min = mod

    print(min)

if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    (l, r) = list(map(int, input().split()))

    ans = 2020
    for i in range(l, min(r + 1, l + 2019)):
        for j in range(i + 1, min(r + 1, i + 2020)):
            mod = i * j % 2019
            if mod <= ans:
                ans = mod

    print(ans)

if __name__ == "__main__":
    main()
import collections
from scipy.sparse import lil_matrix
from scipy.sparse.csgraph import bellman_ford

N, M, P = [int(_) for _ in input().split()]
ABC = [[int(_) for _ in input().split()] for _ in range(M)]
cd = collections.defaultdict
Ga = cd(set)
Gb = cd(set)
ok = cd(int)
for a, b, c in ABC:
    Ga[a].add(b)
    Gb[b].add(a)
#dfs
for pair in [[1, Ga], [N, Gb]]:
    S = pair
    Gn = pair.pop()
    visited = [0] * (N + 1)
    while S:
        s = S.pop()
        if not visited[s]:
            visited[s] = 1
            ok[s] += 1
            for ns in Gn[s]:
                S += [ns]
G = lil_matrix((N + 1, N + 1))
for a, b, c in ABC:
    if ok[a] == ok[b] == 2:
        G[a, b] = P - c
dist_matrix = bellman_ford(G, directed=True, indices=[1])
try:
    print(max(-int(dist_matrix[0][-1]), 0))
except:
    print(-1)


### FIXED CODE ###

import collections
N, M, P = [int(_) for _ in input().split()]
ABC = [[int(_) for _ in input().split()] for _ in range(M)]
cd = collections.defaultdict
Ga = cd(set)
Gb = cd(set)
G = []
ok = cd(int)
for a, b, c in ABC:
    Ga[a].add(b)
    Gb[b].add(a)
#dfs
for pair in [[1, Ga], [N, Gb]]:
    S = pair
    Gn = pair.pop()
    visited = [0] * (N + 1)
    while S:
        s = S.pop()
        if not visited[s]:
            visited[s] = 1
            ok[s] += 1
            for ns in Gn[s]:
                S += [ns]
for a, b, c in ABC:
    if ok[a] == ok[b] == 2:
        G += [(a, b, P - c)]


def bellman_ford(V, G, i):
    INF = float('inf')
    D = [INF] * V
    D[i] = 0
    for _ in range(V):
        update = False
        for s, t, d in G:
            if D[s] != INF and D[t] > D[s] + d:
                D[t] = D[s] + d
                update = True
        if not update:
            return D
        if _ == V:
            return False


a = bellman_ford(N + 1, G, 1)
try:
    print(max(-a[-1], 0))
except:
    print(-1)
N, X, Y = map(int, input().split())

graph = [[False for _ in range(N)] for _ in range(N)]
for i in range(N-1):
    graph[i][i+1] = graph[i+1][i] = True
graph[X-1][Y-1] = graph[Y-1][X-1] = True

ans = [0] * N

def dfs(pos, goal, cnt, visited):
    ans = N
    for i in range(N):
        if not graph[pos][i]: continue
        if visited[i]: continue

        if i == goal:
            return cnt + 1

        visited[i] = True
        ret = dfs(i, goal, cnt + 1, visited)
        if ret is not None:
            ans = min(ans, ret)
        visited[i] = False

    if ans == N:
        return None
    else:
        return ans

visited = [False] * N
for i in range(N):
    for j in range(i+1, N):
        distance = dfs(i, j, 0, visited)
        if distance is not None:
            ans[distance] += 1

for k in range(1, N):
    print(ans[k])


### FIXED CODE ###

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

ans = [0] * N

X -= 1
Y -= 1
for i in range(N):
    for j in range(i+1, N):
        distance = min(abs(i-j), abs(i-X) + 1 + abs(j-Y))
        ans[distance] += 1

for k in range(1, N):
    print(ans[k])
a, b = map(int, input().split())
count = 0

for m in range(1, a+1):5 5
  for d in range(1, b+1):
    if (m-d == 0):
      count += 1

print(count)

### FIXED CODE ###

a, b = map(int, input().split())
if a <= b:
  print(a)
else:
  print(a-1)
N, W = map(int, input().split()

items = [list(map(int, input().split())) for _ in range(N)]

d = {(W, 0)}

for w, v in items:
    tmp = set()
    for rw, rv in d:
        if rw >= w:
            tmp.add((rw-w, rv+v))
    d |= tmp

d = {elm[1] for elm in d}

print(max(d))

### FIXED CODE ###

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

from collections import defaultdict

dp = defaultdict(int)

dp[0] = 0

for _ in range(N):
    w, v = map(int, input().split())
    for k, val in list(dp.items()):
        if k+w <= W:
            dp[k+w] = max(dp[k+w], val+v)



print(max(dp.values()))
N ,K =(int(x) for x in input().split(' '))

s = 0

for a in range(K,N+2) :
  
  SUM1 = sum([x for x in range(0,a)])
  SUM2 = sum([x for x in range(N-a+1, N+1)])
  
  s = s + SUM2 - SUM1 + 1
  
  print(s%10**9+7)

### FIXED CODE ###

import math
a = input()
b = math.pi
print(2*int(a)*b)
N=int(input())
d=set[int(input()) for i in range(N)]
print(len(d))

### FIXED CODE ###

N=int(input())
d=[int(input()) for i in range(N)]
d=set(d)
print(len(d))
N, K = map(int, input().split())
h = [int(input()) for _ in range(N)]
h.sort()
ans = 1<<31
for i in range(N-K)+1:
  ans = min(ans, h[i+K-1]-h[i]
print(ans)

### FIXED CODE ###

N, K = map(int, input().split())
h = [int(input()) for _ in range(N)]
h.sort()
ans = 1<<31
for i in range(N-K+1):
  ans = min(ans, h[i+K-1]-h[i])
print(ans)
A,B,C=map(list,input().split())
print(['NO','YES'][A[-1]==B[0] and B[-1]==

### FIXED CODE ###

A,B,C=map(list,input().split())
print(['NO','YES'][A[-1]==B[0] and B[-1]==C[0]])
n = int(input())
arr = list(int,input().split())
def mod(i): return i%2==1
lst = list(filter(mod==True,arr))
print(len(lst))

### FIXED CODE ###

n = int(input())
arr = list(map(int,input().split()))
def odd(n) : return (n%2==1)
lst = list(filter(odd,arr[0:n:2]))
print(len(lst))
N,M = input().split(" ")
if N > M:
  str = str(M)
  print(str*N)
else:
  str = str(N)
  print(str*M)

### FIXED CODE ###

N,M = input().split(" ")
if N > M:
  str = M
  print(str*int(N))
else:
  str = N
  print(str*int(M))
n,p=map(int,input().split())
s=input()
b=1
d=0
l=[0]*n
ans=0
for c in s[::-1]:
  if p==2 or p==5:
    if int(c)%p==0:
      ans+=1
  else:
    d+=int(c)*b
    d%=p
    l[d]+=1
    b*=10
    b%=p
if p==2 or p==5:
  l[0]=ans
  ans=ans*(ans-1)//2
else:
  for i in l:
    ans+=i*(i-1)//2
print(ans+l[0])

### FIXED CODE ###

n,p=map(int,input().split())
s=input()
b=1
d=0
l=[0]*p
l[0]=1
ans=0
for i,c in enumerate(s[::-1]):
  if p==2 or p==5:
    if int(c)%p==0:
      ans+=n-i
  else:
    d+=int(c)*b
    d%=p
    l[d]+=1
    b*=10
    b%=p
if p!=2 and p!=5:
  for i in l:
    ans+=i*(i-1)//2
print(ans)
s=input()
n=len(s)
s1=s[0:n//2]
s2=s[n//2+1:n]
if s=s[::-1]and s1=s1[::-1] and s2=s2[::-1]: print("Yes")
else: print("No")

### FIXED CODE ###

s=input()
n=len(s)
s1=s[0:n//2]
s2=s[n//2+1:n]
if s==s[::-1]and s1==s1[::-1] and s2==s2[::-1]: print("Yes")
else: print("No")
n,a,b = map(int,input().split())
ans = []
blue = ["b"]*a
red = ["r"]*b

while len(ans) < (n-min(a,b)):
	ans.extend(blue)
	ans.extend(red)

print(ans[:n].count("b"))

### FIXED CODE ###

n,a,b = map(int,input().split())
ans = n // (a + b)*a

rem = n % (a + b)

ans += min(rem,a)
print(ans)
a = 'abcdefghijklmnopqrstuvwxyz'
l = [0]*26
while True:
    try:
        s=raw_input()
    except EOFError:
        break
    for i in s:
        ascNum=ord(i.lower())-97
        if ascNum > 25 or ascNum < 0:
            continue
        l[ascNum]+=1
for i in xrange(26):
    print a[i] + ' : '+ s(l[i])

### FIXED CODE ###

a='abcdefghijklmnopqrstuvwxyz'
l=[0]*26
while True:
    try:
        text=raw_input()
    except EOFError:
        break
    for i in text:
        ascNum=ord(i.lower())-97
        if ascNum < 0 or 25 < ascNum:
            continue
        l[ascNum]+=1
for i in xrange(26):
    print a[i] + ' : '+str(l[i])
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    # divisors.sort()
    return divisors

a = int(input())
ans = make_divisors(a)

print(len(str(max(ans[-1],ans[-2]))))

### FIXED CODE ###

n = int(input())
 
ans = int(1e5)
 
for a in range(1, int(n ** 0.5) + 1):
    if n % a == 0:
        b = len(str(n // a))
        ans = min(b, ans)
print(ans)
def judge(a,b,c,d):
  if(abs(a-b)<=d | abs(a-c)<=d & abs(b-c)<=d):
    print("Yes")
   else:
    print("No")

### FIXED CODE ###

a,b,c,d=map(int,input().split())
print("Yes" if abs(a-c)<=d or abs(a-b)<=d and abs(c-b)<=d else "No")
n,m=input().split()
ab = [map(int, input().split()) for _ in range(m)]
a, b = [list(i) for i in zip(*xy)]
friendnum = [0]*n
for i in range(n):
    for k in range(m):
        if a[k] == i:
            friendnum[i].append(b[i])
        if b[k] == i:
            friendnum[i].append(a[i])
ans = max(ans,len(frindnum[i]))
print(ans)

### FIXED CODE ###

# Union Find

# xの根を求める
def find(x):
    if par[x] < 0:
        return x
    else:
        tank = []
        while par[x] >= 0:
            tank.append(x)
            x = par[x]
        for elt in tank:
            par[elt] = x
        return x


# xとyの属する集合の併合
def unite(x, y):
    x = find(x)
    y = find(y)

    if x == y:
        return False
    else:
        # sizeの大きいほうがx
        if par[x] > par[y]:
            x, y = y, x
        par[x] += par[y]
        par[y] = x
        return True


# xとyが同じ集合に属するかの判定
def same(x, y):
    return find(x) == find(y)


# xが属する集合の個数
def size(x):
    return -par[find(x)]


# 初期化
# 根なら-size,子なら親の頂点
n,m = map(int,input().split())
par = [-1] * n
ans = 0
for i in range(m):
    X,Y = map(int,input().split())
    unite(X-1,Y-1)

for i in range(n):
    ans = max(size(i),ans)
print(ans)
N,K=map(int,input().split())
def pascal(N,K):
  if N == K+1 or K==1:
    return N
  elif K==0 or N==K:
    return 1
  else: return pascal(N-1,K) + pascal(N-1,K-1)
mod = 10**9+7
x=0
for i in range(1,K+1):
  x = pascal(N-K+1,i)*pascal(K-1,i-1)
  print(x%mod)

### FIXED CODE ###

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

mod = 10**9+7
n = N-K+1
print(n)
for i in range(2,K+1):
  n = n * (N-K+2-i)*(K+1-i)//(i*(i-1))
  print(n%mod)
# coding: utf-8

# In[2]:


import sys


# In[18]:


A,B,K = map(int, input().split())


# In[19]:


def yakusuu(x):
    yakusuu_array = []

    for i in range(1, x):
        if num % i == 0:
            yakusuu_array.append(i)
    
    return yakusuu_array


# In[21]:


if K > 1:
    print(list(set(yakusuu(A)) & set(yakusuu(B)))[K-1])
else:
    print(1)



### FIXED CODE ###


# coding: utf-8

# In[26]:


import sys


# In[106]:


A,B,K = map(int, input().split())


# In[107]:


def yakusuu(x):
    yakusuu_array = []

    for i in range(1, x+1):
        if x % i == 0:
            yakusuu_array.append(i)
    
    return yakusuu_array


# In[108]:


y_list = sorted(list(set(yakusuu(A)) & set(yakusuu(B))), reverse=True)


# In[109]:


print(y_list[K-1])
N = int(input())
*A, = map(int, input().split())

d1 = [[0]*60 for _ in range(N+1)]
mod = 10**9+7

for i, n in enumerate(A, start=1):
    for j in range(60):
        d1[i][j] = d1[i-1][j] + n%2
        n//=2

ans = 0
for i, n in enumerate(A, start=1):
    for j in range(60):
        a = d1[N][j]-d1[i][j] # 1
        b = N-a-i # 0

        if n%2:
            ans += b*(2**j)
        else:
            ans += a*(2**j)
        n//=2
	ans %= mod

print(ans)


### FIXED CODE ###

N = int(input())
*A, = map(int, input().split())

d1 = [[0]*60 for _ in range(N+1)]
mod = 10**9+7

for i, n in enumerate(A, start=1):
    for j in range(60):
        d1[i][j] = d1[i-1][j] + ((n>>j)&1)

ans = 0
for i, n in enumerate(A, start=1):
    for j in range(60):
        a = d1[N][j]-d1[i][j] # 1
        if (n>>j)&1:
            a = N-a-i # 0

        ans += a*(1<<j)
    ans %= mod

print(ans)
N, K = map( int, input().split())
A = []
for i in range(N):
    a, b = map( int, input().split())
    A += [a]*b
    A = A.sort()[:K]
print(A[K-1])

### FIXED CODE ###

N, K = map( int, input().split())
A = [ [0]*2 for _ in range(N)]
for i in range(N):
    A[i] = list(map( int, input().split()))
A.sort()
L = 0
for i in range(N):
    L += A[i][1]
    if L >= K:
        print(A[i][0])
        break
while True:
 x = int(input().split())

 if x[0] == 0 and x[1] == 0:
  break

 if x[0]>x[1]:
  print('%d %d' % (x[1],x[0]))
 else:
  print('%d %d' % (x[0],x[1]))


### FIXED CODE ###

while True:
 a,b = map(int,input().split())

 if a == 0 and b == 0:
  break

 if a>b:
  print(b,a)
 else:
  print(a,b)
#1,2,3の番号がついた3マスに，それぞれ"0"か"1"がある．"1"のマスはいくつあるか

s1,s2,s3 = map(int,input().split())

res = (s1 + s2 + s3)
print (res)


### FIXED CODE ###

#1,2,3の番号がついた3マスに，それぞれ"0"か"1"がある．"1"のマスはいくつあるか

s = input()
a = [int(c) for c in s]
print (a[0]+a[1]+a[2])