Harryxun/stf_run huggingface dataset:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
from typing import List

def rdp_connect() -> bool:
    global s1, s2
    s1 = input()
    if s1 == '.':
        return False
    s2 = input()
    return True

def rdp_token(s: str) -> List[str]:
    res = []
    while s:
        match = re.match(r'[a-zA-Z0-9;]+', s)
        if match:
            res.append(s[:match.end()])
            s = s[match.end():]
            continue
        match = re.match(r'"[^"]*"', s)
        if match:
            res.append(s[:match.end()-1])
            s = s[match.end():]
            continue
        break
    return res

def rdp_check() -> bool:
    l1 = rdp_token(s1)
    l2 = rdp_token(s2)
    if len(l1) != len(l2):
        return False
    flag = True
    for t1, t2 in zip(l1, l2):
        if t1 == t2:
            continue
        if t1[0] == t2[0] == '"' and flag:
            flag = False
        else:
            return False
    return True

if __name__ == '__main__':
    while rdp_connect():
        if s1 == s2:
            print('IDENTICAL')
        elif rdp_check():
            print('CLOSE')
        else:
            print('DIFFERENT')

### FIXED CODE ###

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re

def rdp_connect() -> bool:
    global s1, s2
    s1 = input()
    if s1 == '.':
        return False
    s2 = input()
    return True

def rdp_token(s: str):
    res = []
    while s:
        match = re.match(r'[a-zA-Z0-9;]+', s)
        if match:
            res.append(s[:match.end()])
            s = s[match.end():]
            continue
        match = re.match(r'"[^"]*"', s)
        if match:
            res.append(s[:match.end()-1])
            s = s[match.end():]
            continue
        break
    return res

def rdp_check() -> bool:
    l1 = rdp_token(s1)
    l2 = rdp_token(s2)
    if len(l1) != len(l2):
        return False
    flag = True
    for t1, t2 in zip(l1, l2):
        if t1 == t2:
            continue
        if t1[0] == t2[0] == '"' and flag:
            flag = False
        else:
            return False
    return True

if __name__ == '__main__':
    while rdp_connect():
        if s1 == s2:
            print('IDENTICAL')
        elif rdp_check():
            print('CLOSE')
        else:
            print('DIFFERENT')
a,b,c=map(int,input().split())
d=0
for i in range(a,b+1)
 if c%i==0:
  d+=1
print(d)

### FIXED CODE ###

a,b,c=map(int,input().split())
d=0
for i in range(a,b+1):
 if c%i==0:
  d+=1
print(d)
# coding: utf-8
import math


def solve(*args: str) -> str:
    r = int(args[0])

    return str(2*math.pi()*r)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))


### FIXED CODE ###

# coding: utf-8
import math


def solve(*args: str) -> str:
    r = int(args[0])

    return str(2*math.pi*r)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))
a,b,c,d=list(input());print("YNeos"[1-(a==b==c or b==c==d)::2])

### FIXED CODE ###

a,b=input().split();print([[">","="][ord(a)==ord(b)],"<"][ord(a)<ord(b)])
x = int(input())
num = 11000
arr = list(range(2,num))
arr = set(arr)
primes = {2}

prime = min(arr)
while prime < num-500:
    primes.add(prime)
    nonprime = {prime * i for i in range(1,num//prime + 2)}
    arr = arr.difference(nonprime)
    prime = min(arr)

sol = {i for i in primes if i >= x}

print(min(sol))

### FIXED CODE ###

x = int(input())
num = 100200
arr = list(range(2,num))
arr = set(arr)
primes = {2}
floor = int(num**0.5)+2

prime = min(arr)
while prime < floor:
    prime = min(arr)
    primes.add(prime)
    nonprime = {prime * i for i in range(1,num//prime + 2)}
    arr = arr.difference(nonprime)

primes = primes.union(arr)

sol = {i for i in primes if i >= x}

print(min(sol))
import sys
sys.setrecursionlimit(1000000)
from collections import deque


h,w=map(int,input().split())
s = [list(input()) for i in range(h)]

def bfs(sx,sy,gx,gy):
    dx = [0,1,0,-1]
    dy = [1,0,-1,0]
    d = [[float('inf')]*w for i in range(h)]
    q = deque()
    q.append((sx,sy))
    d[sx][sy] = 0
    while q:
        x,y = q.popleft()
        for i in range(4):
            nx = x + dx[i]
            ny = y + dy[i]
            if  0<= nx < h and 0 <= ny < w and d[nx][ny]==float('inf') and s[nx][ny]=='.':
                q.append((nx,ny))
                d[nx][ny] = d[x][y]+1
    return max([max(i) for i in d])

count = 0
for i in range(h):
    for j in range(w):
        if s[i][j] != '#':
            count  = max(count, bfs(i,j,k,l))
print(count)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
from collections import deque


h,w=map(int,input().split())
s = [list(input()) for i in range(h)]

def bfs(sx,sy):
    dx = [0,1,0,-1]
    dy = [1,0,-1,0]
    d = [[-1]*w for i in range(h)]
    q = deque()
    q.append((sx,sy))
    d[sx][sy] = 0
    while q:
        x,y = q.popleft()
        for i in range(4):
            nx = x + dx[i]
            ny = y + dy[i]
            if  0<= nx < h and 0 <= ny < w and d[nx][ny]==-1 and s[nx][ny]=='.':
                q.append((nx,ny))
                d[nx][ny] = d[x][y]+1
    return max([max(i) for i in d])

count = 0
for i in range(h):
    for j in range(w):
        if s[i][j] != '#':
            count  = max(count, bfs(i,j))
print(count)
import sys
H = sys.stdin.readline()
H = int(H)

count = 0
roop_c = 2
while True:
    H = H // 2
    count += roop_c
    roop_c *= 2

    if H == 1:
        break

print(count+1)


### FIXED CODE ###

import sys
inputs = sys.stdin.readline()
inputs = inputs.split()
# inputs = inputs.split('')

H, A = int(inputs[0]), int(inputs[1])

count = 0
while H>0:
    H =  H - A
    count += 1
print(count)
for i,j in range(1,101):
  print(i*j)

### FIXED CODE ###

a,b = map(int,input().split())
print(a*b)
kazu = int(input())
suji = input().split()

l_si_i = [int(s) for s in suji]

for i in range(kazu):
    if i == 0:
        if l_si_i[i+1] - l_si_i[i] < -1:
            print('No')
            exit()
        elif l_si_i[i+1] - l_si_i[i] == -1:
            l_si_i[i] = l_si_i[i] - 1
            continue
        else:
            continue

    elif i > 0 and kazu - i != 1:
        if l_si_i[i+1] - l_si_i[i] < -1:
            print('No')
            exit()
        elif l_si_i[i+1] - l_si_i[i] == -1:
            if l_si_i[i] - l_si_i[i-1] >= 0:
                l_si_i[i] = l_si_i[i] - 1
            else:
                print('No')
                exit()
        else:
            continue
    elif kazu - i == 1:
        if l_si_i[i] - l_si_i[i-1] >= 0:
            l_si_i[i] = l_si_i[i] - 1
        else:
            print('No')
            exit()
print('Yes')


### FIXED CODE ###

n = input()
l = list(map(int, input().split()))
m = 0
a = "Yes"
for i in l:
    if i < m-1:
        a = "No"
        break
    m = max(m, i)
print(a)
import sys
sys.setrecursionlimit(10**6)
# グラフの最長経路が-1か-2かを選べる
N = int(input())
edge = [[] for _ in range(N)]
INF = 10**18
for _ in range(N-1):
  a,b = map(int,input().split())
  edge[a-1].append(b-1)
  edge[b-1].append(a-1)

opposite = 0
max_dist = 0
def f(d,x):
  global max_dist,opposite
  dx = d[x]
  if dx > max_dist:
    opposite = x
    max_dist = dx
  for y in edge[x]:
    if d[y] == INF:
      d[y] = dx + 1
      f(d,y)

# 0からの距離
d = [INF] * N
d[0] = 0
f(d,0)

v = opposite
d = [INF] * N
d[v] = 0
f(d,v)

X = max_dist

ans = 'First' if max_dist%3 != 1 else 'Second'
print(ans)

### FIXED CODE ###

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

H,W = map(int,input().split())
INF = 10**18
q = []

visited = [[True]*(W+2)]
visited += [[True] + [x == '#' for x in input().rstrip()] + [True] for _ in range(H)]
visited.append([True]*(W+2))
  
for i in range(1,H+1):
  for j in range(1,W+1):
    if visited[i][j]:
      q.append((i,j))

moves = [(0,1),(0,-1),(1,0),(-1,0)]

ans = -1
while q:
  qq = []
  ans += 1
  for x,y in q:
    if not visited[x-1][y]:
      visited[x-1][y] = True
      qq.append((x-1,y))
    if not visited[x+1][y]:
      visited[x+1][y] = True
      qq.append((x+1,y))
    if not visited[x][y-1]:
      visited[x][y-1] = True
      qq.append((x,y-1))
    if not visited[x][y+1]:
      visited[x][y+1] = True
      qq.append((x,y+1))
  q = qq
  
print(ans)
n,m = map(int,input().split())
ans = [0]*n
for i in range(m):
  a,b = map(int,input().split())
  a-=1,b-=1
  ans[a] +=1
  ans[b] +=1
for i in range(n):
  if ans[i]%2 ==1:
    print("NO")
    exit()
print("YES")

### FIXED CODE ###

n,m = map(int,input().split())
ans = [0]*n
for i in range(m):
  a,b = map(int,input().split())
  a-=1;b-=1
  ans[a] +=1
  ans[b] +=1
for i in range(n):
  if ans[i]%2 ==1:
    print("NO")
    exit()
print("YES")
#n**p mod m を計算する(デフォルト引数は10**9+7)
def n_ruijyou_p(n,p,m=10**9+7):
    bin_p=format(p,'b')
    ans=1
    nruijyou2i=n
    
    if bin_p[0]=='1':
       ans=ans*nruijyou2i%m

    for i in range(1,len(bin_p)):
        nruijyou2i=(nruijyou2i)**2
        print(nruijyou2i)
        if bin_p[i]=='1':
            ans=ans*nruijyou2i%m
           
    return ans 
  
x,y=map(int,input().split())
print(n_ruijyou_p(x,y))

### FIXED CODE ###

r=int(input())
print(r**2)
N, K = map(int, input().split())

paskal3 = [[1]]
for i in range(1, N):
    l = [1]
    for j in range(1, i):
        l.append(paskal3[i-1][j-1]+paskal3[i-1][j])
    l.append(1)
    paskal3.append(l)


def comb(n, r):
    return paskal3[n][r]


for i in range(1, K+1):
    print((comb(N-K+1, i) * comb(K-1, i-1)) % (10**9+7))


### FIXED CODE ###

N, B = map(int, input().split())
R = N-B
MOD = 10**9+7

paskal3 = [[1]]
for i in range(1, N+5):
    l = [1]
    for j in range(1, i):
        l.append((paskal3[i-1][j-1]+paskal3[i-1][j]) % MOD)
    l.append(1)
    paskal3.append(l)


def comb(n, r):
    try:
        return paskal3[n][r]
    except:
        return 0


for i in range(1, B+1):
    print((comb(R+1, i) * comb(B-1, i-1)) % MOD)
N, A, B = map(int, input().split())
l = []
l_a = ['b' for i in range(A)]
l_b = ['r' for i in range(B)]
for val in range(N // (A + B)):
    l += l_a
    l += l_b
cnt = 0
for val in range(N):
    if l[val] == 'b':
        cnt += 1
print(cnt)

### FIXED CODE ###

N, A, B = map(int, input().split())
x = N // (A + B)
y = N % (A + B)
if y < A:
    print(x*A + y)
else:
    print(x*A + A)
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in range(len(S)):
    print(S[i])

### FIXED CODE ###

A,B,K=(int(i) for i in input().split())
a=B-A+1
if K>=a:
  for i in range(A,B+1):
    print(i)
else:
  L1=list(range(A,A+K))
  L2=list(range(B-K+1,B+1))
  S=list(set(L1+L2))
  S.sort()
  for i in S:
    print(i)
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=[-1]*N
for i in range(N):
    C[i]=A[i]-B[i]
C.sort()

count=0
num=0
print(C)
if (sum(C))<0:
    print(-1)
else:
    while C[0]<0:
        count+=1
        num+=C.pop(0)    
        if num<0:
            num+=C.pop(-1)
            count+=1
    print(count)

### FIXED CODE ###

# coding: utf-8
# Your code here!
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=[-1]*N
for i in range(N):
    C[i]=A[i]-B[i]
C.sort()
 
count=0
num=0
#print(C)
 
if (sum(C))<0:
    print(-1)
else:
    while C[0]<0:
        count+=1
        num+=C.pop(0)    
        if num<0:
            num+=C.pop(-1)
            count+=1
        if len(C)==0:
            break
    print(count)
N,M = map(int,input().split())
A = [0] * N
B = [0] * N
C = [[0,0] for i in range(N)]
check = 0
money = 0
a = 0
k = 0

for i in range(N):

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

C.sort()

while a == 0:

    if check + C[k][1] <= M:

        check += C[k][1]
        money += C[k][0]*C[k][1]
        k += 1

    else:

        money += C[k][0] * (M-check)
        a += 1

print(money)



### FIXED CODE ###

N,M = map(int,input().split())
A = [0] * N
B = [0] * N
C = [[0,0] for i in range(N)]
check = 0
money = 0
a = 0
k = 0

for i in range(N):

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

C.sort()

while a == 0:

    if check + C[k][1] < M:

        check += C[k][1]
        money += C[k][0]*C[k][1]
        k += 1

        
    else:

        money += C[k][0] * (M-check)
        a += 1

print(money)
n,q=map(int,input().split())
s=input()
cnt=[]
for i in range(n-1):
    if s[i:i+1]=="AC":
      cnt.append(1)
    else:
      cnt.append(0)

for i in range(q):
    li,ri=map(int,input().split())
#    print(s[li-1:ri].count("AC"))
    print(cnt[li-1:ri-1].sum())

### FIXED CODE ###

n,q=map(int,input().split())
s=input()
cnt=[0]*n
icnt=0
for i in range(n-1):
#    print(s[i:i+2])
    if s[i:i+2]=="AC":
      icnt=icnt+1
      cnt[i+1]=cnt[i]+1
    else:
      cnt[i+1]=cnt[i]
#print(cnt,s)
for i in range(q):
    li,ri=map(int,input().split())
#    print(s[li-1:ri].count("AC"))
#    print(sum(cnt[li-1:ri-1]))
    print(cnt[ri-1]-cnt[li-1])
import numpy as np

### FIXED CODE ###

while True:
    try:
        a,b,c,d,e,f = (int(i) for i in input().split())
        det=a*e-b*d
        x = (c*e-b*f)/det
        y = (a*f-c*d)/det
        if x==0:x=0
        if y==0:y=0
        print("{0:.3f} {1:.3f}".format(x,y))
    except EOFError:
        break
S = input()
if S = 'RRR':print(3)
if S = 'RRS':print(2)
if S = 'RSR':print(1)
if S = 'RSS':print(1)
if S = 'SRR':print(2)
if S = 'SRS':print(1)
if S = 'SSR':print(1)
if S = 'SSS':print(0)

### FIXED CODE ###

S = input()
if S == 'SSS':print(0)
if S == 'SSR':print(1)
if S == 'SRS':print(1)
if S == 'RSS':print(1)
if S == 'SRR':print(2)
if S == 'RRS':print(2)
if S == 'RSR':print(1)
if S == 'RRR':print(3)
i = 1
while True:
    input = int(input())
    if input == 0:
        break
    print("Case {}: {}, i, input)
    i += 1

### FIXED CODE ###

import sys, itertools
  
for count, input in zip(itertools.count(1), sys.stdin):
    if int(input) == 0: break
    print('Case {0}: {1}'.format(count, input), end='')
n, a, b = map(int, input().split())
p = 10**9 + 7
def ModComb(n, r, p):
    N = n%p
    R = r%p
    if N<R:
        return 0
    if N < 2*R:
        R = N-R
    if R == 0:
        return 1
    else:
        return (n*pow(r, p-2, p))%p*ModComb(n-1, r-1, p)

ans = 1
for i in range(N):
  ans *= 2
  ans = ans%p
ans = ans - 1 - ModComb(n, a, p) - ModComb(n, b, p)
ans = ans%p
print(ans)

### FIXED CODE ###

def cmb(n, r, p):
    A = 1
    B = 1
    r = min(r, n - r)
    for i in range(r):
        A = A * (n-i) % p
        B = B * (i+1) % p
    return A * pow(B, p-2, p) % p

n, a, b = map(int, input().split())
p = 10**9 + 7
A = pow(2, n, p) - 1 - cmb(n, a, p) - cmb(n, b, p)
A = A%p
print(A)
def product(a):
  result = 1
  for i in a:
    result = result * i
  return result
def foo(a, b):
  result = 0
  for i in a:
    result = result + a/i
  return result
n = int(input())
a = list(map(int, input().split()))
numerator = product(a)
denominator = foo(a, numerator)
print(numerator/denominator)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
inv_a = [1/i for i in a]
print(round(1/sum(inv_a), 5))
n,T = map(int, input().split())
a = [int(input()) for i in range(n)]
m = 1001
for i in range(n):
    c,t = map(int, input().split())
    if t <= T and c < m:
        m = c
print(m)

### FIXED CODE ###

n,T = map(int, input().split())
m = 1001
for i in range(n):
    c,t = map(int, input().split())
    if t <= T and c < m:
        m = c
if m == 1001:
    print('TLE')
else:
    print(m)
from math import gcd
from math import sqrt


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


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

C = gcd(A, B)
if (C == 1):
    print(1)
    exit(0)
arr = factorization(C)

#print(arr)
print(len(arr) + 1)


### FIXED CODE ###

from fractions import gcd
from math import sqrt


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


def main():
    A, B = map(int, input().split())
    C = gcd(A, B)
    if (C == 1):
        print(1)
        exit(0)
    arr = factorization(C)
    # print(arr)
    print(len(arr) + 1)


if __name__ == "__main__":
    main()
import math
N,K=map(int,input.split())
A=list(map(int,input().split()))

#全ての丸太を長さt以下にするのに必要な切断数が
#k以下であるような最大のtを求める
ok=10**9
ng=0

def isok(t):
  res=0
  for i in range(N):
    res+=int(math.log2(A[i]//t))
  return res<=K

while abs(ok-ng)>1:
  mid=(ok+ng)//2
  if isok(mid):
    ok=mid
  else:
    ng=mid

print(ok)


### FIXED CODE ###

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

#全ての丸太を長さt以下にするのに必要な切断数が
#k以下であるような最大のtを求める
ok=max(A)
ng=0

def isok(t):
  res=0
  for i in range(N):
    res+=A[i]//t-(A[i]%t==0)
  return res<=K

while abs(ok-ng)>1:
  mid=(ok+ng)//2
  if isok(mid):
    ok=mid
  else:
    ng=mid

print(ok)
from collections import Counter
n = int(input())
a = Counter(input().split())
ans += 0
for i in range(len(a)):
  if a.keys()[i][1] < int(a.keys()[i][0]):
    ans += a.keys()[i][0]
    
  elif a.keys()[i][1] >int(a.keys()[i][0]):
    ans +=(int(a.keys()[i][0])-a.keys()[i][1])
    
print(ans)
    
    
  

### FIXED CODE ###

from collections import Counter
n = int(input())
a = Counter(input().split())
ans = 0
for i,j in a.items():
  i = int(i)
  if i>j:
    ans +=j
  elif i <j:
    ans += j-i
print(ans)
N=int(input())
a=[int(input()) for i in range(N)]
b=[]
j=1
def c(j):
    if j==1:
        return 1
    else:
        return a[c(j-1)-1]
if 2 not in a:
    print(-1)
else:
    while j in range(1,N+1):
      if a[c(j)-1] not in b:
         b.append(a[c(j)-1])
         if a[c(j)-1]==2:
            break
         else:
            j += 1 
      else:
          break
    if 2 not in b:
        print(-1)
    else:
        print(len(b))


### FIXED CODE ###

N=int(input())
a=[int(input()) for i in range(N)]
b=[]
j=1
k=1
c=1
if 2 not in a:
    print(-1)
else:
    while j in range(1,N+1):
         c += 1
         if a[k-1]==1:
                 print(-1)
                 break
         elif a[k-1]==2:
                 print(c-1)
                 break
         else:
            j += 1
            k = a[k-1]
    if c>=(N+1):
        print(-1)
#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i<(n); i++)
typedef long long ll;
using namespace std;

int main(){
    int N; cin >> N;
    int i=1;
    while(N>=i*i){
        i++;
    }
    cout << (i-1)*(i-1);
}

### FIXED CODE ###

N=int(input())

i=1
while(N>=i*i):
    i+=1

print((i-1)*(i-1))
N = list(input())
n = 0

S = 0
for i in range(len(N)):
    S = S + int(N[i])
    n = (int(N[i])999999999 * (10 ** (len(N) - i - 1))) + n
    
if n % S == 0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

N = list(input())
n = 0

S = 0
for i in range(len(N)):
    S = S + int(N[i])
    n = (int(N[i]) * (10 ** (len(N) - i - 1))) + n
    
if n % S == 0:
    print('Yes')
else:
    print('No')
N = int(input())
A = list(map(int, input().split()))

D = [0]*(10**6+1)
for i in A:
    # ダブってる値は2以上に
    D[i] += 1

U = []
for i in range(10**6+1):
    # ダブってる値は2以上に
    if D[i] == 1:
        U.append(i)

A = list(set(A))

T = [0]*(max(A)+1)
for i in A:
    # iの2以上の倍数の値は1に
    for j in range(2*i, 10**6+1, i):
        T[j] = 1

# Tが0かつDが1の数を数える
ans = 0
for i in U:
    if T[i] == 0:
        ans += 1

print(ans)

### FIXED CODE ###

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

cnt = [0] * ((10 ** 6) + 1)

for elem in a:
    cnt[elem] += 1

unique = []

for i in range((10 ** 6) + 1):
    if cnt[i] == 1:
        unique.append(i)

cnt = [0] * ((10 ** 6) + 1)

a = list(set(a))

for elem in a:
    for m in range(elem * 2, (10 ** 6) + 1, elem):
        cnt[m] = 1

ans = 0
        
for elem in unique:
    if cnt[elem] == 0:
        ans += 1

print(ans)
N=int(input())
P=[list(map(int,input().split()))]
import numpy
P=numpy.array(P)
result =numpy.prod(P[0])

if result>10**18:
    print(-1)
else:
    print(int(result))


### FIXED CODE ###

a,b=map(int,input().split())
print(a*b)
while True
    x,y = (int,input().split)
    if (x,y) == (0,0):
        break
    else:
        if x < y:
            print(x,y)
        else:
            print(y,x)


### FIXED CODE ###

while True:
    x,y = map(int,input().split())
    if (x,y) == (0,0):
        break
    else:
        if x < y:
            print(x,y)
        else:
            print(y,x)
s=input().split()
place=[]
for i in range(len(s)-1):
  if s[i]!=s[i+1]:
    place.append(i)
ans=[0 for i in range(len(s))]
cur_p=place[0]
cur_p_i=0
for i in range(len(s)):
  if i>=cur_p:
    cur_p_i+=1
    cur_p=place[cur_p_i]
  if (i-cur_p)%2=0:
    ans[cur_p]+=1
  else:
    ans[cur_p+1]+=1
print(" ".join(ans))

### FIXED CODE ###

s=input()
place=[]
for i in range(1,len(s)):
  if s[i]!=s[i-1]:
    place.append(i)
ans=[0 for i in range(len(s))]
cur_p=place[0]
cur_p_i=0
is_l=False
set_place=set(place)
for i in range(len(s)):
  if i in set_place:
    if is_l:
      cur_p_i+=2
      cur_p=place[cur_p_i]
    is_l=not is_l
  if (i-cur_p)%2==0:
    ans[cur_p]+=1
  else:
    ans[cur_p-1]+=1
print(" ".join(map(str,ans)))
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, sep="\n")
    quit()

s = sorted(s)
print(*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")
def count(b, total, N):
    remain = N%total
    if remain < b:
        return remain
    else:
        return b
      
data = input()
N, b, r = [int(i) for i in data.split()]
 
ball = int(N/total) * b + count(b, b+r, N)
print(ball)

### FIXED CODE ###

def count(b, total, N):
  r = N%total
  if r < b:
    return r
  else:
    return b

data = input()
N, b, r = [int(i) for i in data.split()]

total = b + r

ball = int(N/total) * b + count(b, total, N)
print(ball)
import sys
 sys.setrecursionlimit(10**9)
 
def dfs(now, prev):
    ans[now]+=(h[now]+ans[prev])
    # 今いる頂点から行ける頂点を順に next に入れてループ
    for next in g[now]:
        if next != prev:
            if memo[next]==True:
                # 過去に訪れていれば終わらせる
                return False
            else:
                memo[next] = True
                dfs(next, now)
 
#木構造の取り込み 
n, q = map(int, input().split())
g = [[] * n for i in range(n)]
for i in range(n-1):
    u, v = map(int, input().split())
    u -= 1
    v -= 1
    g[u].append(v)
    g[v].append(u)

#操作の取り込み
h=[0]*n
for i in range(q):
    u, v = map(int, input().split())
    u -= 1
    h[u]+=v

#初期のカウンター
ans=[0]*n
memo = [False for i in range(n)]

#DFSでカウンターを動かす
dfs(0,0)
 
print(' '.join(map(str, ans)))

### FIXED CODE ###

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

def dfs(now, prev):
    ans[now]+=(h[now]+ans[prev])
    # 今いる頂点から行ける頂点を順に next に入れてループ
    for next in g[now]:
        if next != prev:
            if memo[next]==True:
                # 過去に訪れていれば終わらせる
                return False
            else:
                memo[next] = True
                dfs(next, now)
 
#木構造の取り込み 
n, q = map(int, input().split())
g = [[] * n for i in range(n)]
for i in range(n-1):
    u, v = map(int, input().split())
    u -= 1
    v -= 1
    g[u].append(v)
    g[v].append(u)
 
#操作の取り込み
h=[0]*n
for i in range(q):
    u, v = map(int, input().split())
    u -= 1
    h[u]+=v
 
#初期のカウンター
ans=[0]*n
memo = [False for i in range(n)]
 
#DFSでカウンターを動かす
dfs(0,0)
 
print(' '.join(map(str, ans)))
n = int(input())
def solve(i,n):
    if i**2 >n:
        return print((i-1)**2)
    else:
        return solve(i+1,n)

solve(1,n)

### FIXED CODE ###

n = int(input())
import sys
sys.setrecursionlimit(10**5)
def solve(i,n):
    if i**2 >n:
        return print((i-1)**2)
    else:
        return solve(i+1,n)

solve(1,n)