Harryxun/stf_run huggingface dataset:
n,m,k=map(int,input().split())
class UnionFind(object):
    def __init__(self, N):
        self.parent = [i for i in range(N)]
        self.size = [1 for i in range(N)]
 
    def merge(self, a, b):
        if self.issame(a,b):
            return
        pa = self.root(a)
        pb = self.root(b)
        self.parent[pa] = pb
        self.size[pb] += self.size[pa]
    
    def root(self, x):
        p = self.parent[x]
        if p == x:
            return x
        else:
            r = self.root(p)
            self.parent[x] = r
            return r
    def issame(self, x, y):
        return self.root(x) == self.root(y)
    def getsize(self, x):
        return self.size[self.root(x)]
uf=UnionFind(n)
ans=[0]*n
for i in range(m):
    a,b=map(int,input().split())
    uf.merge(a-1,b-1)
    ans[a-1]-=1;ans[b-1]-=1
for i in range(k):
    c,d=map(int,input().split())
    if uf.issame(c-1,d-1):
        ans[c-1]-=1;ans[d-1]-=1
for i in range(n):
    ans[i]=uf.getsize(i)+ans[i]-1
print(*ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
n,m,k=map(int,input().split())
class UnionFind(object):
    def __init__(self, N):
        self.parent = [i for i in range(N)]
        self.size = [1 for i in range(N)]
 
    def merge(self, a, b):
        if self.issame(a,b):
            return
        pa = self.root(a)
        pb = self.root(b)
        self.parent[pa] = pb
        self.size[pb] += self.size[pa]
    
    def root(self, x):
        p = self.parent[x]
        if p == x:
            return x
        else:
            r = self.root(p)
            self.parent[x] = r
            return r
    def issame(self, x, y):
        return self.root(x) == self.root(y)
    def getsize(self, x):
        return self.size[self.root(x)]
uf=UnionFind(n)
ans=[0]*n
for i in range(m):
    a,b=map(int,input().split())
    uf.merge(a-1,b-1)
    ans[a-1]-=1;ans[b-1]-=1
for i in range(k):
    c,d=map(int,input().split())
    if uf.issame(c-1,d-1):
        ans[c-1]-=1;ans[d-1]-=1
for i in range(n):
    ans[i]=uf.getsize(i)+ans[i]-1
print(*ans)
import sys
sys.setrecursionlimit=10**12

def modinv(a,m=10**9+7):
    if a==0: return 1
    else:
        b=m
        (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 lastx % m

def cur(p):
    for x in neighbor[p]:
        par[x]=p
        try:
            neighbor[x].remove(p)
        except: sys.exit()
        descend[p]+=cur(x)
    return descend[p]

def cur2(p):
    for x in neighbor[p]:
        ans[x]=ans[p]*descend[x]*modinv(n-descend[x])
        ans[x]%=mod
        cur2(x)

mod=10**9+7
n=int(input())
neighbor=[set()  for _ in range(n+1)]
descend=[1]*(n+2)
par=[-1]+[0]*n

for _ in range(n-1):
    a,b=map(int,input().split())
    neighbor[a].add(b)
    neighbor[b].add(a)
cur(1)


ans=[1]*(n+1)
ans1=1
for i in range(1,n+1):
    ans1=ans1*i*modinv(descend[i])
    ans1%=mod
ans[1]=ans1

cur2(1)

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

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)

def modinv(a,m=10**9+7):
    if a==0: return 1
    else:
        b=m
        (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 lastx % m

def cur(p):
    if neighbor[p]==[]: return
    for x in neighbor[p]:
        par[x]=p
        neighbor[x].remove(p)
        cur(x)
    descend[par[p]]+=descend[p]

def cur2(p):
    for x in neighbor[p]:
        ans[x]=ans[p]*descend[x]*modinv(n-descend[x])
        ans[x]%=mod
        cur2(x)

mod=10**9+7
n=int(input())
neighbor=[set()  for _ in range(n+2)]
descend=[1 for i in range(n+1)]
par=[0]+[0]*(n+1)

for _ in range(n-1):
    a,b=map(int,input().split())
    neighbor[a].add(b)
    neighbor[b].add(a)

cur(1)


ans=[1]*(n+1)
ans1=1
for i in range(1,n+1):
    ans1=ans1*i*modinv(descend[i])
    ans1%=mod
ans[1]=ans1

cur2(1)

for i in range(1,n+1):
    print(ans[i])
A = int(input())
B = int(input())

if A<=8 and B <=8:
    print("Yay!")
elif A>8 or B>8:
    print(":(")


### FIXED CODE ###

S = input()
A,B = S.split()

A = int(A)
B = int(B)

if A<=8 and B <=8:
    print("Yay!")
elif A>8 or B>8:
    print(":(")
A,B,K=map(int,input().split())
a=list(range(A,B+1))
e=a[:K]
f=a[:-K-1:-1]
g=list(set(e+f))
g.sort()
for i in g :
  print(i)

### FIXED CODE ###

A, B, K = map(int, input().split())
 
X = list(range(A, min(A+K, B+1)))
Y = list(range(max(A+K, B-K+1), B+1))
for v in X + Y:
    print(v)
import bisect
n = int(input())
s = input()
r = []
g = []
b = []
for i in range(n):
	if s[i] == "R":
		r.append(i+1)
	elif s[i] == "G":
		g.append(i+1)
	else:
		b.append(i+1)
ans = 0
for i in r:
	for j in g:
		ans += len(b)
		if i > j:
			k = j-abs(i-j)
			m = i+abs(i-j)
		else:
			k = j+abs(i-j)
			m = i-abs(i-j)
		if k <= b[-1] and k >= b[0]:
			x = bisect.bisect_left(b,k)
			if x < len(b) and b[x] == k:
				ans -= 1
		if m <= b[-1] and m >= b[0]:
			x = bisect.bisect_left(b,m)
			if x < len(b) and b[x] == m:
				ans -= 1
		l = (i+j)//2
		if abs(i-l) == abs(j-l):
			x = bisect.bisect_left(b,l)
			if x < len(b) and b[x] == l:
				ans -= 1
print (ans)

### FIXED CODE ###

import bisect
n = int(input())
s = input()
r = []
g = []
b = []
for i in range(n):
	if s[i] == "R":
		r.append(i+1)
	elif s[i] == "G":
		g.append(i+1)
	else:
		b.append(i+1)
ans = 0
if len(r) == 0 or len(g) == 0 or len(b) == 0:
	print (0)
	exit()
for i in r:
	for j in g:
		ans += len(b)
		if i > j:
			k = j-abs(i-j)
			m = i+abs(i-j)
		else:
			k = j+abs(i-j)
			m = i-abs(i-j)
		if k <= b[-1] and k >= b[0]:
			x = bisect.bisect_left(b,k)
			if x >= 0 and x < len(b):
				if b[x] == k:
					ans -= 1
		if m <= b[-1] and m >= b[0]:
			x = bisect.bisect_left(b,m)
			if x >= 0 and x < len(b):
				if b[x] == m:
					ans -= 1
		l = (i+j)//2
		if abs(i-l) == abs(j-l):
			x = bisect.bisect_left(b,l)
			if x >= 0 and x < len(b):
				if b[x] == l:
					ans -= 1
print (ans)
from _collections import defaultdict
import sys

class Graph:

    def __init__(self, n):
        self.g = defaultdict(list)
        self.dp = [-1 for i in range(n + 1)]


    def add_edge(self, x, y):
        self.g[x].append(y)

    def longest_path_util(self, node):

        # if node not in self.g:
        #     # print(node)
        #     return 0

        if self.dp[node] != -1:
            return self.dp[node]

        leaf = 1
        best_child = 0
        for neib in self.g[node]:
                leaf = 0
                best_child = max(best_child, self.longest_path_util(neib))

        if leaf != 0:

            self.dp[node] = 0

        else:
            self.dp[node] = best_child + 1

        return self.dp[node]


    def longest_path(self, n):

        ans = 0

        for i in range(1, n + 1):

            ans = max(ans, self.longest_path_util(i))


        return ans


n, k =  list(map(int, sys.stdin.readline().split()))
graph = Graph(n)
for _ in range(k):
    x, y = list(map(int, sys.stdin.readline().split()))
    graph.add_edge(x, y)

# print(graph.g)
print(graph.longest_path(n))






### FIXED CODE ###

from _collections import defaultdict
import sys
import collections
import sys
sys.setrecursionlimit(10**6)


def get_ls():
    return list(map(int, input().split()))


def longest_path_util(node, graph, dp):

    res = 0

    if dp[node] != -1:
        return dp[node]

    for neib in graph[node]:
        res = max(res, longest_path_util(neib, graph, dp) + 1)

    dp[node] = res

    return dp[node]


graph = defaultdict(list)

[n, k] = get_ls()

dp = [-1] * n

for _ in range(k):
    [x, y] = get_ls()
    graph[x - 1].append(y - 1)

ans = 0

for i in range(n):
    ans = max(ans, longest_path_util(i, graph, dp))

print(ans)
from fractions import gcd
#from functools import reduce
a=int(input())
li=list(map(int,input().split()))
left_gcd=[]
left_gcd.append(li[0])
right_gcd=[]
right_gcd.append(li[a-1])

for i in range(a-1):
    left_gcd.append(gcd(left_gcd[i],li[i+1]))
k=0
for i in range(a-1,0,-1):
    right_gcd.append(gcd(right_gcd[k],li[i-1]))
    k=k+1
# def gcd_list(numbers):
#     return reduce(math.gcd, numbers)
#print(right_gcd)
#print(left_gcd)
num_li=[]
num_li.append(right_gcd[a-2])
num_li.append(left_gcd[a-2])
#s=2
for i in range(a):
    ans=math.gcd(left_gcd[(a-3)-i],right_gcd[i])
    #print(left_gcd[(a-3-i)],right_gcd[i])
  
    #print(ans)
    num_li.append(ans)
    

print(max(num_li))


### FIXED CODE ###

 
#from functools import reduce
def gcd(m,n):
  x=max(m,n)
  y=min(m,n)
  while y!=0:
    x,y=y,x%y
  return x
 
a=int(input())
li=list(map(int,input().split()))
left_gcd=[0]
#left_gcd.append(li[0])
right_gcd=[0]
#right_gcd.append(li[a-1])

for i in range(a):
    left_gcd.append(gcd(li[i],left_gcd[i]))
    right_gcd.append(gcd(li[a-1-i],right_gcd[i]))
    #k=k+1
# def gcd_list(numbers):
#     return reduce(math.gcd, numbers)
#print(right_gcd)
#print(left_gcd)
num_li=[]
#num_li.append(right_gcd[a-2])
#num_li.append(left_gcd[a-2])
#s=2
for i in range(a):
    ans=gcd(left_gcd[(a-1)-i],right_gcd[i])
    #print(left_gcd[(a-3-i)],right_gcd[i])
  
    #print(ans)
    num_li.append(ans)
    

print(max(num_li))
n,m=map(int,input().split())
s=input()
t=input()

from math import gcd

lcm=n*m//gcd(n,m)

if s[0]!=t[0]:
    print(-1)
    exit(0)

ans=lcm
# sについて
dn={}
for i in range(n):
    if i==0:
        dn[1]=s[i]
    else:
        dn[i*int((lcm)/n) +1]=s[i]

for j in range(m):
    if j==0:
        continue
    else:
        k = j*int(lcm/m) + 1

        if k in dn:
            if dn[k]!=t[j]:
                ans=-1
        else:
            dn[k]=t[j]

print(ans)





### FIXED CODE ###

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

from fractions import gcd

lcm=n*m//gcd(n,m)

if s[0]!=t[0]:
    print(-1)
    exit(0)

ans=lcm
# sについて
dn={}
for i in range(n):
    if i==0:
        dn[1]=s[i]
    else:
        dn[i*int((lcm)/n) +1]=s[i]

for j in range(m):
    if j==0:
        continue
    else:
        k = j*int(lcm/m) + 1

        if k in dn:
            if dn[k]!=t[j]:
                ans=-1
        else:
            dn[k]=t[j]

print(ans)
(a, b) = int(input())

print("a" + " " + "b")

### FIXED CODE ###

x = input().split()
a = int(x[0])
b = int(x[1])
print(a*b, (a+b)*2)
for i in range(1, n+1):
    while i % 2 == 0:
        if not 2 in divisor_dic:
            divisor_dic[2] = 1
        else:
            divisor_dic[2] += 1
        i //= 2
    f = 3
    while f*f <= i:
        if i % f ==0:
            if not f in divisor_dic:
                divisor_dic[f] = 1
            else:
                divisor_dic[f] += 1
        
            i //= f
        
        else:
            f += 2
    
    if i != 1:
        if not i in divisor_dic:
            divisor_dic[i] = 1
        else:
            divisor_dic[i] += 1
                
c = 1          
for v in divisor_dic.values():
    c *= (v+1)
    c %= 10**9+7

print(c)

### FIXED CODE ###

import math

n = int(input())

prime_n = [2]

for i in range(3,n+1,2):
    if all( i % prime != 0 for prime in prime_n):
        prime_n.append(i)

multiply = []

for i in prime_n:
    k = 1
    temp = 0
    while i**k <= n:
        temp += math.floor(n/(i**k))
        k+=1
    
    multiply.append(temp)

ans = 1

for i in multiply:
    ans*=(i+1)
    ans%=((10**9)+7)

print(ans)
N = int(input())
A = []
for i in range(1,46):
  for j in range(1,46):
    for k in range(1,46):
      A.append(i**2+j**2+k**2+i*j+i*k+j*k)
A = sorted(A)
B = [0]*N
for i in range(N):
  if A[i] == A[i-1]:
    B[A[i]] += 1
  else:
    B[A[i]]=1
[print(i) for i in B]
      
      

### FIXED CODE ###

N = int(input())
 
ans = [0] * 10050
 
for i in range(1, 105):
    for j in range(1, 105):
        for k in range(1, 105):
            v = i*i+j*j+k*k+i*j+i*k+j*k
            if v < 10050:
                ans[v] += 1
 
for i in range(N):
    print(ans[i+1])
if A==B==C:
    print(-1)
else:
    for i in range(100000000):
        if A %2==0 and B%2==0 and C%2==0:
            a = A/2
            b = B/2
            c = C/2
            A = b+c
            B = a+c
            C = a+b
        else:
            print(i)
            exit()

### FIXED CODE ###

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

if A==B==C:
    if A%2==0:
        print(-1)
    else:
        print(0)

else:
    for i in range(1000000000):
        if A %2==0 and B%2==0 and C%2==0:
            a = A/2
            b = B/2
            c = C/2
            A = b+c
            B = a+c
            C = a+b
        else:
            print(i)
            exit()
A=int(input())
B=int(input())
C=int(input())
X=int(input())

total,out=0,0

for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if a*500+b*100+c*50 == 0:
        out+=1
        
print(out)

### FIXED CODE ###

inputs=[int(input()) for _ in range(3)]

val=inputs[0]-inputs[1]

syo=val//inputs[2]
print(val-(inputs[2]*syo))
# -*- coding: utf-8 -*-
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
a3 = list(map(int, input().split()))
a = [a1, a2, a3]
n = int(input())
b = []
for i in range(n):
    bn = int(input())
    b.append(bn)
for i in range(3):
    for j in range(3):
        if a[i][j] in b:
            a[i][j] = -5
print(*a)
for i in range(3):
    if sum(a[i]) == -15:
        bng = 1
for i in range(3):
     cnt = 0
     for j in range(3):
       cnt += a[j][i]
       if cnt == -15:
         bng = 1
        
cnt = 0
for i in range(3):
        cnt += a[i][i]
if cnt == -15:
        bng = 1 
                
if bng == 1:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

# -*- coding: utf-8 -*-
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
a3 = list(map(int, input().split()))
a = [a1, a2, a3]
n = int(input())
b = []
bng = 0
for i in range(n):
    bn = int(input())
    b.append(bn)
for i in range(3):
    for j in range(3):
        if a[i][j] in b:
            a[i][j] = -5
for i in range(3):
    if sum(a[i]) == -15:
        bng = 1
for i in range(3):
     cnt = 0
     for j in range(3):
       cnt += a[j][i]
       if cnt == -15:
         bng = 1
        
cnt = 0
for i in range(3):
        cnt += a[i][i]
if cnt == -15:
        bng = 1 
if a[0][2] + a[1][1] + a[2][0] == -15:
    bng = 1
                
if bng == 1:
    print("Yes")
else:
    print("No")
x, y = map(int, input().split())

num = 1
while x < y:
    x *= 2
    num += 1

print(num)

### FIXED CODE ###

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

l = a+b
r = c+d
msg = "Balanced"
if l > r:
   msg = "Left"
elif l < r:
   msg = "Right"
print(msg)
#coding: utf-8
N, M = map(int, input().split())
points = list(map(int, input().split()))
points = sorted(points)
koma = [points[i+1] - points[i] for i in range(M-1)]
koma.sort(reverse=True)
print(sum(koma[:M-N]

### FIXED CODE ###

#coding: utf-8
x, t = map(int, input().split())
print(x / t)
a = list(input())
b = list(input())
c = list(input())
A, B, C = map(len, (a, b, c))
OFFSET = 4000
L = 8001
ab = [True] * L
ac = [True] * L
bc = [True] * L

for i in range(A):
    for j in range(B):
        if a[i] != b[j] and a[i] != '?' and b[j] != '?':
            ab[i - j + OFFSET] = False  # BをAからi-jずらした時を考える

for i in range(A):
    for j in range(C):
        if a[i] != c[j] and a[i] != '?' and c[j] != '?':
            ac[i - j + OFFSET] = False  # CをAからi-jずらした時を考える

for i in range(B):
    for j in range(C):
        if b[i] != c[j] and c[i] != '?' and b[j] != '?':
            bc[i - j + OFFSET] = False  # CをBからi-jずらした時を考える

ans = float('inf')
for i in range(L):  # Bの左端をずらす
    for j in range(L):  # Cの左端をずらす
        k = j - i + OFFSET
        if k >= L or k < 0:
            continue
        if ab[i] and ac[j] and bc[k]:
            head = min(i, j, OFFSET)
            tail = max(A + OFFSET, B + i, C + j)
            ans = min(ans, tail - head)

print(ans)


### 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 math
import numpy as np
from functools import reduce
n,x=map(int,input().split())
p=list(map(int,input().split()))
p=np.array(p)
p=p-x

def gcd_list(numbers):
    return reduce(math.gcd, numbers)
print(gcd_list(p))

### FIXED CODE ###

import math
import numpy as np
import functools
import fractions
n,x=map(int,input().split())
p=list(map(int,input().split()))
p=np.array(p)
p=abs(p-x)
print(functools.reduce(fractions.gcd, p))
N = int(input())
# A = []
lst = [list(f"{i:0{N}b}") for i in range(2**N)]
# X = [[] for i in range(N)]
# Y = [[] for i in range(N)]

# for i in range(N):
#     tmp_A = int(input())
#     A.append(tmp_A)
#     for j in range(tmp_A):
#         tmp_x,tmp_y = input().split()
#         X[i].append(int(tmp_x)-1)
#         Y[i].append(tmp_y)

ans = -1

# for i in range(2**N):
#     flag = 1
#     for j in range(N):
#         if lst[i][j] == "1":
#             for k in range(A[j]):
#                if lst[i][X[j][k]] != Y[j][k]:
#                    flag = 0
#     if flag:
#         tmp = 0
#         for j in lst[i]:
#             if j == "1":
#                tmp += 1
#         if tmp > ans:
#             ans = tmp

print(ans)

### FIXED CODE ###

N = int(input())
A = []
lst = [list(format(i, '0%db' % N)) for i in range(2**N)]
X = [[] for i in range(N)]
Y = [[] for i in range(N)]

for i in range(N):
    tmp_A = int(input())
    A.append(tmp_A)
    for j in range(tmp_A):
        tmp_x,tmp_y = input().split()
        X[i].append(int(tmp_x)-1)
        Y[i].append(tmp_y)

ans = -1

for i in range(2**N):
    flag = 1
    for j in range(N):
        if lst[i][j] == "1":
            for k in range(A[j]):
               if lst[i][X[j][k]] != Y[j][k]:
                   flag = 0
    if flag:
        tmp = 0
        for j in lst[i]:
            if j == "1":
               tmp += 1
        if tmp > ans:
            ans = tmp

print(ans)
N, M ,K = map(int, input().split())
graph = {}
for m in range(M):
    p,q = map(int, input().split())
    if p-1 in graph.keys():
        graph[p-1].append(q-1)
    else:
        graph[p-1] = [q-1]
    if q-1 in graph.keys():
        graph[q-1].append(p-1)
    else:
        graph[q-1] = [p-1]
bgraph = {}
for k in range(K):
    p,q = map(int, input().split())
    if p-1 in bgraph.keys():
        bgraph[p-1].append(q-1)
    else:
        bgraph[p-1] = [q-1]
    if q-1 in bgraph.keys():
        bgraph[q-1].append(p-1)
    else:
        bgraph[q-1] = [p-1]
output = []
fin_list = [0]*N
for n, i in enumerate(fin_list):
    if i == 1:
        pass
    else:
        seen = [0]*N
        seen[n]=1
        fin_list[n] = 1
        todo =  graph[n].copy()
        while todo != []:
            for j in todo:
                if seen[j] == 1:
#                     print("pass!! seen=={}, j == {}".format(seen, j))
                    todo.remove(j)
                else:
                    todo.extend(graph[j])
                    todo.remove(j)
#                     print("todo=={}___seen=={}___ j=={}".format(todo, seen, j))
                    seen[j] = 1
                    fin_list[j]=1
        smallout = []
        for q, s in enumerate(seen):
            if s == 1:
                smallout.append(q)
        output.append(smallout)
final = []
for n in range(N):
    for w in output:
        if n in w:
            bcount=0
            if n in bgraph.keys():
                for b in bgraph[n]:
                    if b in w:
                        bcount+=1
            final.append(str(len(w)-1-len(graph[n])-bcount))
print(" ".join(final))

### FIXED CODE ###

class UnionFind():
    def __init__(self,n):
        # リンク情報　子→親の番号　親(根)→負のサイズ
        self.d=[-1 for i in range(n)]
    
    def find(self,x):
        if(self.d[x]<0):return x
        self.d[x]=self.find(self.d[x])
        return self.d[x]
 
    def unite(self,x,y):
        x=self.find(x)
        y=self.find(y)
        if(x==y):return False
        if(self.d[x]>self.d[y]):x,y=y,x
        self.d[x]+=self.d[y]
        self.d[y]=x
        return True
 
    def same(self,x,y):return self.find(x)==self.find(y)
    def size(self,x):return -1*self.d[self.find(x)]
n,m,k=map(int,input().split())
uf=UnionFind(n)
deg=[0 for i in range(n)]
to=[[] for i in range(n)]
for i in range(m):
    a,b=map(int,input().split())
    a-=1
    b-=1
    uf.unite(a,b)
    deg[a]+=1
    deg[b]+=1
for i in range(k):
    a,b=map(int,input().split())
    a-=1
    b-=1
    to[a].append(b)
    to[b].append(a)
for i in range(n):
    ans=uf.size(i)-1-deg[i]
    for j in to[i]:
        if(uf.same(i,j)):ans-=1
    print(ans,end=" ")
splited = input().split(' ')
N = int(splited[0])
K = int(splited[1])
 
if(K == 1):
    print(0)
else
    print(N - K)

### FIXED CODE ###

splited = input().split(' ')
N = int(splited[0])
K = int(splited[1])
 
if(K == 1):
    print(0)
else:
    print(N - K)
a, b, k = map(int, input().split())
ls = list(range(a, b + 1))
lsRe = ls[::-1]
s = set()

if len(ls) > k:
    for i in range(k):
        s.add(ls[i])
        s.add(lsRe[i])
else:
    print("ls", *ls, sep="\n")
    quit()

s = sorted(s)
print("set", *s, sep="\n")


### FIXED CODE ###

a, b, k = map(int, input().split())
s = set()
if b - a == 0:
    print(a)
elif b - a + 1 <= k:
    print(*range(a, b + 1), sep="\n")
else:
    for i in range(k):
        s.add(a + i)
        s.add(b - i)
    s = sorted(s)
    print(*s, sep="\n")
#AIsing2020 d
 
import sys
input = sys.stdin.readline
 
N = int(input())
X = input().rstrip()
X10 = int('0b'+X,2)
X10_num1 = X.count('1')
X10_pulse = X10%(X10_num1+1)
X10_ninus = X10%(X10_num1-1)


for i in range(N,0,-1):
    a = X10
    if a>>(i-1) & 1:
        a -= 2**(i-1)
        amari = (X10_ninus - (2**(i-1))%(X10_num1-1))%(X10_num1-1)
    else:
        a += 2**(i-1)
        amari = (X10_pulse + (2**(i-1))%(X10_num1+1))%(X10_num1+1)
    nc = amari
    if a ==0:
        co = 0
    else:
        co = 1
        while nc >0:
            bin_str = bin(nc)
            cou1 = bin_str.count('1')
            nc = nc%cou1
            co +=1
    
    print(co)

### FIXED CODE ###

#AIsing2020 d

def f(n):
        cnt = 0
        while n:
            cnt+= 1
            n = n%bin(n).count('1')
        return cnt

def main():
    N = int(input())
    X = input()
    X10 = int(X,2)
    X10_num1 = X.count('1')
    X10_pulse = X10%(X10_num1+1)
    X10_ninus = X10%(X10_num1-1) if X10_num1 >1 else 0


    for i in range(N,0,-1):
        j = N-i
        if (X[j] == '1') and X10_num1 >1:
            mod = X10_num1-1
            amari = (X10_ninus - pow(2,i-1,mod))%(mod) 
        elif (X[j] == '1') and X10_num1 ==1:
            print(0)
            continue
        else:
            mod = X10_num1+1
            amari = (X10_pulse + pow(2,i-1,mod))%(mod)

        print(1+f(amari))


main()
import numpy as np


N, D = list(map(int, input().split()))
X = [list(map(int, input().split())) for i in range(N)]

ans = 0
for i in range(N):
    for j in range(i + 1, N):
        dis = np.linalg.norm(np.array(X[i]) - np.array(X[j]))
        if dis - int(dis) < 0.00000001:
            ans += 1
print(ans)


### FIXED CODE ###

import numpy as np


N, D = list(map(int, input().split()))
X = [list(map(int, input().split())) for i in range(N)]

ans = 0
for i in range(N):
    for j in range(i + 1, N):
        dis = np.linalg.norm(np.array(X[i]) - np.array(X[j]))
        if dis - int(dis) < 0.00000001:
            ans += 1
print(ans)