Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

import numpy as np
N = int(input())
l = []
num = int(N**0.5)+1

for x in range(1,num+1):
    for y in range(1,num+1):
        for z in range(1,num+1):
            fn = x**2 + y**2 + z**2 + x*y + y*z + z*x
            l.append(fn)

for i in range(1,N+1):
    print(l.count(i)) 



### FIXED CODE ###

import itertools
N = int(input())
num = int(N**0.5)+1

ans = [0]*(N+1)

# for x in range(1,num+1):
#     for y in range(1,num+1):
#         for z in range(1,num+1):

for x,y,z in itertools.product(range(1, num+1), repeat=3):
    fn = x**2 + y**2 + z**2 + x*y + y*z + z*x
    if fn > N:
        continue
    else:
        ans[fn] += 1

for i in range(1,len(ans)):
    print(ans[i])
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10 ** 9)

N, Q = map(int, input().split())
AB = [[0]*2 for i in range(N-1)]
for i in range(N-1):
  AB[i] = list(map(int, input().split()))
C = [0]*N
g = list([] for i in range(N+1))
for i in range(Q):
  p, x = map(int, input().split())
  C[p-1] += x

for i,j in AB:
  g[i].append(j)
  g[j].append(i)
 
def BTS(a, b):
  for i in g[a]:
    if i == b:
      continue
    C[i-1] += C[a-1]
    BTS(i,a)
    
BTS(1,-1)
 
print(*C)


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 9)

N, Q = map(int, input().split())
AB = [[0]*2 for i in range(N-1)]
for i in range(N-1):
  AB[i] = list(map(int, input().split()))
C = [0]*N
g = list([] for i in range(N+1))
for i in range(Q):
  p, x = map(int, input().split())
  C[p-1] += x

for i,j in AB:
  g[i].append(j)
  g[j].append(i)
 
def BTS(a, b):
  for i in g[a]:
    if i == b:
      continue
    C[i-1] += C[a-1]
    BTS(i,a)
    
BTS(1,-1)
 
print(*C)
### BUGGY CODE ###

if __name__ == '__main__':
    N = int(input())
    # A, B = [], []
    score = []
    for n in range(N):
        a, b = map(int, input().split())
        # A.append([n, a])
        # B.append([n, b])
        score.append([n, a-b, a, b])

    score.sort(key=lambda x: x[1])
    closed = [False for _ in range(N)]

    tak_p, ao_p = 0, 0
    while True:
        if len(score) == 0:
            break
        tak_p += score[0][2]
        score = score[1:]

        if len(score) == 0:
            break
        ao_p += score[0][3]
        score = score[1:]

    print(tak_p - ao_p)


### FIXED CODE ###

if __name__ == '__main__':
    N = int(input())
    B, AandB = [], []
    for n in range(N):
        a, b = map(int, input().split())
        B.append(b)
        AandB.append(a+b)

    AandB.sort(reverse=True)
    ans = -sum(B)

    for i in range(0, N, 2):
        ans += AandB[i]

    print(ans)
### BUGGY CODE ###

#ABC137_C
N=int(input())
str_list=["".join(sorted(input(),reverse=True)) for _ in range(N)]
cnt=0
for _ in range(N-1):
    cnt+=str_list.count(str_list.pop(-1))
print(cnt)

### FIXED CODE ###

#ABC137_C
from collections import Counter
N=int(input())
S=[input() for i in range(N)]

ctr=Counter()
ans=0

for s in S:
    a=''.join(sorted(list(s)))
    if a in ctr:
        ans+=ctr[a]
    ctr[a]+=1
print(ans)
### BUGGY CODE ###

n, q = [int(i) for i in input().split()]
s = input()
m = [0] * (len(s) - 1)
for i in range(len(m)):
    if s[i] + s[i+1] == "AC": m[i] = 1

for i in range(q):
    l, r = [int(i) for i in input().split()]
    print(sum(m[l-1:r-1]))


### FIXED CODE ###

from itertools import accumulate
n, q = [int(i) for i in input().split()]
s = input()
m = [0] * (len(s) - 1)
for i in range(len(m)):
    if s[i:i+2] == "AC": m[i] = 1
a = [0] + list(accumulate(m))

for i in range(q):
    l,r = [int(i) for i in input().split()]
    print(a[r-1] - a[l-1])
### BUGGY CODE ###

S = input()

count = 0
for y in range(len(S) - 3):
    for x in range(len(S) - y - 3):
        check_S = int(S[y:x + y + 4])
        if check_S % 2019 == 0:
            count += 1
print(count)


### FIXED CODE ###

S = input()

count = 0
mod_check = [0] * 2019
mod_check[0] = 1
check_S = 0
d = 1
for i in reversed(S):
    check_S += int(i) * d
    check_S %= 2019
    mod_check[check_S] += 1
    d *= 10
    d %= 2019
    count += 1
mod_match = 0
for x in mod_check:
    mod_match += x * (x - 1) // 2
print(mod_match)
### BUGGY CODE ###

#!/usr/bin/env python
# -*- coding:utf-8 -*-
#from __future__ import print_function
import time
import sys
import io
import re
import math
start = time.clock()
i = 0
n=input()
S=map(int, raw_input().split())
q=input()
T=map(int, raw_input().split())
s=sorted(set(S), key=S.index)
print len(set(s)&set(T))

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding:utf-8 -*-
#from __future__ import print_function
import time
import sys
import io
import re
import math
start = time.clock()
i = 0
n=input()
S=map(int, raw_input().split())
q=input()
T=map(int, raw_input().split())
#s=sorted(set(S), key=S.index)
print len(set(S)&set(T))
### BUGGY CODE ###

n,m = map(int,input().split())
l = [list(map(int,input().split())) for _ in [0]*n]
l.sort(key=lambda x:x[0])
ans = 0
tmpl = []
flag = True

for d in range(1,m+1):
  while  len(l)>=1 and l[0][0] <= d:
    tmpl.append(l[0][1])
    del l[0]
  if len(tmpl) > 0:
    maxindex = tmpl.index(max(tmpl))
    ans += tmpl[maxindex]
    del tmpl[maxindex]
print(ans)


### FIXED CODE ###

from heapq import heappush,heappop
n,m = map(int,input().split())
l = [list(map(int,input().split())) for _ in [0]*n]
l.sort(key=lambda x:x[0])
ans = 0
tmpl = []
i = 0
for d in range(1,m+1):
  while i<=n-1 and l[i][0] <= d:
    #tmpl.append(l[i][1])
    heappush(tmpl,-l[i][1])
    i += 1
  if len(tmpl) > 0:
    #maxindex = tmpl.index(max(tmpl))
    #ans += tmpl[maxindex]
    #del tmpl[maxindex]
    ans -= heappop(tmpl)
print(ans)
### BUGGY CODE ###

from collections import deque

n,m = map(int,input().split())
ab = [list(map(int,input().split())) for _ in range(m)]

g = {i:[] for i in range(n+1)}

for a,b in ab:
    g[a].append(b)
    g[b].append(a)
    
seen = [0]*(n+1)
seen[1]=1
q = deque()
q.append(1)
grpsize=1

while 0 in seen[1:]:
    if len(q)>0:
        now = q.popleft()
        nextp = g[now]
        for i in nextp:
            if seen[i]==0:
                q.append(i)
                grpsize+=1
                seen[i]=grpsize
        
    else:
        for i in range(1,n+1):
            if seen[i]==0:
                grpsize=1
                seen[i]=grpsize
                q.append(i)
                break
                
print(max(seen))

### FIXED CODE ###

from sys import setrecursionlimit

def find(par,i):
    if par[i]<0:
        return i
    par[i] = find(par,par[i])
    return par[i]

def unite(par,i,j):
    ri = find(par,i)
    rj = find(par, j)
    if ri==rj:
        return
    par[rj] += par[ri]
    par[ri] = rj
    
setrecursionlimit(10**6)
n,m = map(int,input().split())

parent = [-1]*n
for _ in range(m):
    a,b = map(lambda x:int(x)-1,input().split())
    unite(parent,a,b)
    
print(-min(parent))
### BUGGY CODE ###

k = int(input())
x = 7%k
cnt = 0

if k%2 ==0:
    print('-1')
else:
    while True:
        cnt += 1
        if x == 0:
            print(cnt)
            break
        else:
            x = (x*10+7)%k

### FIXED CODE ###

k = int(input())
x = 7%k
cnt = 0

if k%2 ==0:
    print('-1')
else:
    while True:
        cnt += 1
        if x == 0:
            print(cnt)
            break
        elif cnt == k:
            print('-1')
            break
        else:
            x = (x*10+7)%k
### BUGGY CODE ###

n = int(input())
s = [input() for _ in range(n)]
ans = 0
for i in range(n):
  s[i] = list(s[i])
  s[i].sort()
for j in range(n):
  for k in range(n):
    if j<k and s[j] == s[k]:
      ans += 1
print(ans)

### FIXED CODE ###

n = int(input())
dic = {}
ans = 0
for i in range(n):
  s = "".join(sorted(input()))
  a = dic.get(s)
  if a is None:
    dic[s] = 1
  else:
    ans += a
    dic[s] += 1
print(ans)
### BUGGY CODE ###

def f(x, A, F):
    result = 0
    for i in range(N):
        t = x // F[i]
        if t < A[i]:
            result += A[i] - t
    return result


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

A.sort()
F.sort(reverse=True)

lo = 0
hi = A[-1] * F[0]
while lo < hi:
    mid = (lo+hi)//2
    if K - f(mid, A, F) < 0:
        lo = mid+1
    else:
        hi = mid
print(lo)


### FIXED CODE ###

def f(x, A, F):
    result = 0
    for i in range(N):
        t = x // F[i]
        if t < A[i]:
            result += A[i] - t
    return result


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

A.sort()
F.sort(reverse=True)

lo = 0
hi = A[-1] * F[0]
while lo < hi:
    mid = (lo+hi)//2
    if K - f(mid, A, F) < 0:
        lo = mid+1
    else:
        hi = mid
print(lo)
### BUGGY CODE ###

import queue

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

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

c = [0] * n

for i in range(qq):
    p,x = map(int, input().split())
    c[p - 1] += x

q = queue.Queue()
q.put(0)

find = [False] * n

while not q.empty():
    v = q.get()
    find[v] = True
    for u in es[v]:
        if find[u]:
            continue
        c[u] += c[v]
        q.put(u)

print(*c)

### FIXED CODE ###

from collections import deque
N, Q = map(int, input().split())
G = [[] for _ in range(N)]
count = [0]*N
for i in range(N-1):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
for i in range(Q):
    p, x = map(int, input().split())
    count[p-1]+=x
q = deque([0])
flag = [False]*N
while q:
    v = q.pop()
    flag[v] = True
    for e in G[v]:
        if flag[e]:
            continue
        count[e]+=count[v]
        q.append(e)
print(*count)
### BUGGY CODE ###

s_list = list(input())
q = int(input())
reverse = False

for _ in range(q):
	query= input().split()
	if int(query[0]) == 1:
		if reverse: reverse = False
		else: reverse = True
	elif int(query[0]) == 2:
		if int(query[1]) == 1:
			if reverse:
				s_list.append(query[2])
			else:
				s_list.insert(0, query[2])
		elif int(query[1]) == 2:
			if reverse:
				s_list.insert(0, query[2])
			else:	
				s_list.append(query[2])


if reverse:
	s_list.reverse()
for s in s_list:
  print(s, end ="")



### FIXED CODE ###

from collections import deque

s_list = list(input())
d = deque(s_list)
q = int(input())
reverse = False

for _ in range(q):
	query= input().split()
	if int(query[0]) == 1:
		if reverse: reverse = False
		else: reverse = True
	elif int(query[0]) == 2:
		if int(query[1]) == 1:
			if reverse:
				d.append(query[2])
			else:
				d.appendleft(query[2])
		elif int(query[1]) == 2:
			if reverse:
				d.appendleft(query[2])
			else:	
				d.append(query[2])


if reverse:
	d.reverse()
for s in d:
  print(s, end ="")
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10**6)

n = int(input())
a = list(map(int, input().split()))
dic = dict()
dic[(0,0,0)] = 0
def dfs(uno,dos,tres):
  if uno < 0 or dos < 0 or tres < 0:
    return 0
  if (uno,dos,tres) in dic:
    return dic[(uno,dos,tres)]
  t = uno + dos + tres
  res = n
  res += uno*dfs(uno-1,dos,tres)
  res += dos*dfs(uno+1,dos-1,tres)
  res += tres*dfs(uno,dos+1,tres-1)
  res /= t
  dic[(uno,dos,tres)] = res
  return res
 
print(dfs(a.count(1),a.count(2),a.count(3)))
    

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
uno = a.count(1)
dos = a.count(2)
tres = n - uno - dos
dp = [[[0]*(n+1) for _ in range(dos+tres+1)] for j in range(tres+1)]
for k in range(tres+1):
  for j in range(dos+tres-k+1):
    for i in range(n+1-j-k):
      if i+j+k == 0: continue
      v = i+j+k
      res = n
      if i: res += i * dp[k][j][i-1]
      if j: res += j * dp[k][j-1][i+1]
      if k: res += k * dp[k-1][j+1][i]
      dp[k][j][i] = res / v
print(dp[tres][dos][uno])
### BUGGY CODE ###

import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

from decimal import Decimal

def get_primes(n):
	#divs = []
	divs = defaultdict(int)
	for i in range(2, int(n**0.5)+1):
		c = 0
		while n % i == 0:
			n = n // i
			c += 1
		if c > 0:
			#divs.append((i, c))
			divs[i] = c
	if n > 1:
		#divs.append((n, 1))
		divs[n] = 1
	return divs

L = 10**9
N = ri()
A = []
for i in range(N):
	d = Decimal(rs())
	A.append(int(d*L))
#print(A)

C = [[0, 0] for i in range(N)]
for i, r in enumerate(A):
	ps = get_primes(r)
	#print(r, ps)
	C[i] = [min(ps[2], 18), min(ps[5], 18)]
#print(C)

h = defaultdict(int)
#for c in C:
#print(h)
ans = 0
for c in C:
	#print('c',c)
	d = [18-c[0], 18-c[1]]
	for i in range(d[0], 19):
		for j in range(d[1], 19):
			if (i, j) in h:
				#print('ok', i, j)
				ans += h[(i,j)] - (c == (i,j))
	h[tuple(c)] += 1

print(ans)


### FIXED CODE ###

import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

from decimal import Decimal

def gcd(a, b):
	return gcd(b, a%b) if b else a

L = 10**9
LL = 10**18
N = ri()
A = []
for i in range(N):
	d = Decimal(rs())
	A.append(int(d*L))

h = defaultdict(int)
for i in range(N):
	g = gcd(A[i], LL)
	h[g] += 1

ans = 0
for g, c in h.items():
	for g2, c2 in h.items():
		if g == g2:
			if g*g % LL == 0:
				ans += c*(c-1)//2
		elif g < g2:
			if g*g2 % LL == 0:
				ans += c * c2
print(ans)
### BUGGY CODE ###

n = int(input())
s = list(input())

for i in range(n - 1):
    for j in range(i + 1, n):
        if s[i] == s[j]:
            s[j] = ""
        else:
            break

print(len(''.join(s)))

### FIXED CODE ###

n = int(input())
s = list(input())

ans = [s[0]]
for i in range(n - 1):
    if s[i] != s[i + 1]:
        ans.append(s[i + 1])

print(len(''.join(ans)))
### BUGGY CODE ###

# -*- coding:utf-8 -*-
count = 0
while True:
    try:
        n = int(input())
        if n == 2 or n == 3:
            count += 1
        if n > 3 and n % 2 != 0:
            for i in range(3,n):
                if n % i == 0:
                    break
                elif i == n - 1:
                    count += 1
    except  EOFError:
        break
print(count)

### FIXED CODE ###

# -*- coding:utf-8 -*-
import math
count = 0
while True:
    try:
        n = int(input())
        if n == 2 or n == 3 or n == 5 or n == 7:
            count += 1
        if n > 3 and n % 2 != 0:
            for i in range(3,int(math.sqrt(n))+1):
                if n % i == 0:
                    break
                elif i == int(math.sqrt(n)):
                    count += 1
    except  EOFError:
        break
print(count)
### BUGGY CODE ###

import bisect as bi
n,m = map(int,input().split())
a = list(map(int,input().split()))
b = [0] * m
for i in range(m):
    b[i] = list(map(int,input().split()))
a.sort()
#print(a)
for i in b:
    tmp = bi.bisect_left(a,i[1])
    for j in range(min(tmp,i[0])):
        a[j] = i[1]
    a.sort()
#print(a)
print(sum(a))

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

from operator import itemgetter

N,M = map(int,readline().split())
A = list(map(int,readline().split()))
m = map(int,read().split())
BC = list(zip(m,m))

BC.sort(key = itemgetter(1),reverse=True)

BC.append((N,-1))

change = []
for b,c in BC:
    change += [c] * b
    if len(change) > N:
        break

A += change
A.sort()
answer = sum(A[-N:])
print(answer)
### BUGGY CODE ###

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

a = 0
b = 0
ans = 0
for k in range(len(A)):
    a += A[k]
    A[k] = a
for k in range(len(B)):
    b += B[k]
    B[k] = b

AA = [0] + A

BB = [0] + B

for k in range(N+1):
    if AA[k] <= K:
        for j in range(M-1, -1, -1):
            if  AA[k] + BB[j+1]> K >= AA[k] + BB[j]:
                ans = max(k+j, ans)
                break
            else:
                continue
        if K >= AA[k] + BB[M]:
            ans = max(k+M, ans)
    else:
        break
print(ans)


### FIXED CODE ###

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a, b = [0], [0]
for i in range(N):
  a.append(a[i] + A[i])
for i in range(M):
  b.append(b[i] + B[i])
ans, j = 0, M
for i in range(N + 1):
  if a[i] > K:
    break
  while b[j] > K - a[i]:
    j -= 1
  ans = max(ans, i + j)
print(ans)
### BUGGY CODE ###

R, C, K = map(int, input().split())
item = [[0] * C for i in range(R)]
for i in range(K):
  r, c, v = map(int, input().split())
  item[r - 1][c - 1] = v

dp = [[[0] * 4 for j in range(C)] for i in range(R)] 
#print(dp, item)


for i in range(R):
  for j in range(C):
    for k in range(4):
      if (i == 0) and (j == 0):
        #if item[0][0] != 0:
        #  dp[0][0][1] = item[0][0]
        continue
      else:
        if i == 0:
          dp[i][j][k] = dp[i][j - 1][k]
          #if (item[i][j] != 0) and (k != 0):
          #  dp[i][j][k] = max(dp[i][j][k], dp[i][j][k - 1] + item[i][j])  
        elif j == 0:
          dp[i][j][0] = max(dp[i][j][0], dp[i - 1][j][k])
          #if (item[i][j] != 0) and (k != 0):
          #  dp[i][j][k] = max(dp[i][j][k], dp[i][j][k - 1] + item[i][j])           
        else:
          dp[i][j][k] = dp[i][j - 1][k]
          dp[i][j][0] = max(dp[i][j][0], dp[i - 1][j][k])
          #if (item[i][j] != 0) and (k != 0):
          #  dp[i][j][k] = max(dp[i][j][k], dp[i][j][k - 1] + item[i][j])       
    for k in range(3):
      dp[i][j][k + 1] = max(dp[i][j][k + 1], dp[i][j][k])
    
    for k in range(3):
          if (item[i][j] != 0):
            dp[i][j][3 - k] = max(dp[i][j][3 - k], dp[i][j][2 - k] + item[i][j])          

#print(item)            
#print(dp)
print(dp[-1][-1][-1])  



### FIXED CODE ###

R,C,K = map(int,input().split())
J=[0] * K
for i in range(K):
  J[i] = list(map(int,input().split()))

#DP0 = [[0]*(C+2) for i in range(R+2)]
DP1 = [[0]*(C+2) for i in range(R+2)]
DP2 = [[0]*(C+2) for i in range(R+2)]
DP3 = [[0]*(C+2) for i in range(R+2)]

MAP = [[0]*C for i in range(R)]

for x,y,v in J:
    MAP[x-1][y-1] = v
#print(MAP)
for i in range(R):
    for j in range(C):
        DP1[i][j] = max(DP1[i][j-1],DP1[i-1][j]+MAP[i][j],DP2[i-1][j]+MAP[i][j],DP3[i-1][j]+MAP[i][j])
        DP2[i][j] = max(DP2[i][j-1],DP1[i][j-1]+MAP[i][j])
        DP3[i][j] = max(DP3[i][j-1],DP2[i][j-1]+MAP[i][j])

#print(DP1)
#print(DP2)
#print(DP3)
ANS=0
for i in range(R):
    for j in range(C):
        ANS=max(ANS,DP1[i][j],DP2[i][j],DP3[i][j])
print(ANS)
### BUGGY CODE ###

N=int(input())
from functools import reduce
size=int(N**.5+(1-1e-9))
a=[0]*N
b=[0]*size
f=lambda v: reduce(lambda x,y:x|y,v,0)
def init(v):
    a=v
    b=[f(a[j*size:(j+1)*size]) for j in range(size)]
    return a,b
def update(i,v):
    a[i]=v
    j=i//size
    b[j]=f(a[j*size:(j+1)*size])
def r_query(l,r):
    L,R=0--l//size,r//size
    if L>=R:
        return f(a[l:r])
    else:
        return f(a[l:L*size]+b[L:R]+a[R*size:r])
def c(n):
    r=0
    while n:
        r+=n&1
        n>>=1
    return r

o=lambda c:ord(c)-ord('a')
bit=[2**i for i in range(26)]
S=input()
Q=int(input())
XYZ=[input().split() for i in range(Q)]
a,b=init([bit[o(c)] for c in S])
for x,y,z in XYZ:
    if x=='1':
        update(int(y)-1,bit[o(z)])
    else:
        print(c(r_query(int(y)-1,int(z))))

### FIXED CODE ###

N=int(input())
from functools import reduce
size=int(N**.5+(1-1e-9))
a=[0]*N
b=[0]*size
f=lambda v: reduce(lambda x,y:x|y,v,0)
def init(v):
    a=v
    b=[f(a[j*size:(j+1)*size]) for j in range(size)]
    return a,b
def update(i,v):
    a[i]=v
    j=i//size
    b[j]=f(a[j*size:(j+1)*size])
def r_query(l,r):
    L,R=0--l//size,r//size
    if L>=R:
        return f(a[l:r])
    else:
        return f(a[l:L*size]+b[L:R]+a[R*size:r])
def c(n):
    r=0
    while n:
        r+=n&1
        n>>=1
    return r

o=lambda c:ord(c)-ord('a')
bit=[2**i for i in range(26)]
S=input()
Q=int(input())
XYZ=[input().split() for i in range(Q)]
a,b=init([bit[o(c)] for c in S])
for x,y,z in XYZ:
    if x=='1':
        update(int(y)-1,bit[o(z)])
    else:
        print(c(r_query(int(y)-1,int(z))))
### BUGGY CODE ###

N, M = map(int, input().split())
G = [set() for i in range(N)]
for i in range(M):
    a, b = map(int, input().split())
    G[a-1].add(b-1)
    G[b-1].add(a-1)

checked = [False for _ in range(N)]
ans = 0
for i in range(N):
    if checked[i]:
        continue

    checked[i] = True
    A = G[i]
    tmp = 1
    while len(A) > 0:
        e = A.pop()
        if checked[e]:
            continue
        checked[e] = True
        tmp += 1
        A = A | G[e]

    ans = max(ans, tmp)

print(ans)

### FIXED CODE ###

class UnionFind:
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, v):
        if self.parents[v] < 0:
            return v
        else:
            self.parents[v] = self.find(self.parents[v])
            return self.parents[v]

    def unite(self, u, v):
        u = self.find(u)
        v = self.find(v)

        if u == v:
            return

        if self.parents[u] > self.parents[v]:
            u, v = v, u

        self.parents[u] += self.parents[v]
        self.parents[v] = u

    def size(self, v):
        return -self.parents[self.find(v)]

    def same(self, u, v):
        return self.find(u) == self.find(v)

N, M = map(int, input().split())
uf = UnionFind(N)
for i in range(M):
    a, b = map(int, input().split())
    uf.unite(a-1, b-1)

ans = 0
for i in range(N):
    ans = max(ans, uf.size(i))

print(ans)
### BUGGY CODE ###

n=int(input())
a=list(map(int, input().split()))
for value in range(n):
    if min(a) > n:
        print(0)
    else:
        print(a.count(value+1))

### FIXED CODE ###

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

c = collections.Counter(a)
for value in range(n):
    if value == 0:
        continue
    else:
        print(c[value])
print(0)
### BUGGY CODE ###

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

G = [set([n]) for n in range(N)]

for m in range(M):
    X, Y, Z = map(int, input().split())
    X   -= 1
    Y   -= 1
    Gx   = G[X]
    Gy   = G[Y]
    Gxy  = Gx | Gy
    for idx in Gxy:
        G[idx] = Gxy

print(len(set([tuple(g) for g in G])))


### FIXED CODE ###

class UnionFind:
    def __init__(self, n):
        self.depth  = [0] * n
        self.parent = list(range(n))

    def find(self, x):
        if x == self.parent[x]:
            return x
        self.parent[x] = self.find(self.parent[x])
        return self.parent[x]

    def unite(self, x, y):
        x, y = self.find(x), self.find(y)
        if x == y:
            return
        if self.depth[x] < self.depth[y]:
            self.parent[x] = y
        else:
            self.parent[y] = x
            if self.depth[x] == self.depth[y]:
                self.depth[x] += 1

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def size(self, x):
        return self.depth[self.ind(x)]


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

T = UnionFind(N)

for m in range(M):
    X, Y, Z  = map(int, input().split())
    T.unite(X-1, Y-1)

print(sum([1 for i in range(N) if T.find(i) == i]))
### BUGGY CODE ###

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

s = set()

for i in range(A, B + 1):
    if i <= A + K - 1:
        s.add(i)
    elif B - K + 1 <= i:
        s.add(i)

s = sorted(s)

for i in s:
    print(i)


### FIXED CODE ###

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)