Harryxun/stf_run huggingface dataset:
# import numpy as np
import copy
import queue


q = queue.Queue()

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


l = np.array(l)
lc = copy.deepcopy(l)
li = [-1 for _ in range(n)]

def search(x):
    if sum(lc[x]) == 0:
        q.queue = False
        return
    
#     ind_lis = np.where(lc[x] == 1)[0]
#     ind_lis = [e for e in ind_lis if li[e] == -1]
#     print(li)
#     print(lc[x])
    for i,e in enumerate(lc[x]):
#         print(i,e)
        if li[i] != -1 or e == 0:
            continue
        li[i] = x
#         print('q', i+1)
        q.put(i)
x = 0
search(x)
while q.queue:
    search(q.get())

if li[1:].count(-1) == 0:
    print('Yes')
    for e in li[1:]:
        print(e+1)
else:
    print('No')


### FIXED CODE ###

# import numpy as np
# import copy
from collections import defaultdict
import queue


q = queue.Queue()

n, m = map(int, input().split())
graph = defaultdict(list)
for _ in range(m):
    a, b = map(lambda x: int(x), input().split())
    graph[a].append(b)
    graph[b].append(a)


# l = np.array(l)
# lc = copy.deepcopy(l)
li = [-1 for _ in range(n)]
li[0] = 1

def search(x):
#     if sum(l[x]) == 0:
#         q.queue = False
#         return
    
#     ind_lis = np.where(lc[x] == 1)[0]
#     ind_lis = [e for e in ind_lis if li[e] == -1]
#     print(li)
#     print(lc[x])
    for e in graph[x]:
#         print(e)
        if li[e-1] != -1:
            continue
        li[e-1] = x
#         print('q', i+1)
        q.put(e)
x = 1
search(x)
while q.queue:
    search(q.get())

if li[1:].count(-1) == 0:
    print('Yes')
    for e in li[1:]:
        print(e)
else:
    print('No')
N, K = [int(i) for i in input().split()]
array = [int(i) for i in input().split()]

max_numbers = []
max_num = 0

for i in range(N-K+1):
    if sum(array[i:i+K]) > max_num:
        max_num = sum(array[i:i+K])
        max_numbers = array[i:i+K]

exv = 0
ev_dict = {}
for n in max_numbers:
    if n in ev_dict:
        evn += ev_dict[n]
    else :
        ev_dict.setdefault(n, 0)
        ev = (1+n) / 2
        exv += ev
        ev_dict[n] = ev
    
print(exv)

### FIXED CODE ###

import numpy as np

N, K = [int(i) for i in input().split()]
numbers = [int(i) for i in input().split()]

ary = np.array([(1 + n) / 2 for n in numbers])

cumsum = ary.cumsum()

max_exv = cumsum[K-1]
for i in range(N - K):
    if cumsum[i+K] - cumsum[i] > max_exv:
        max_exv = cumsum[i+K] - cumsum[i]
    
print(max_exv)
N,K=map(int,input().split())
TD=[list(map(int,input().split())) for i in range(N)]
TD.sort(key=lambda x:x[1],reverse=True)

ANS=0

check=[0]*(10**5)
NOCHANGE=[]
NETA=[]

for i in range(K):
    ANS+=TD[i][1]
    NETA.append(TD[i][0])


for i in range(N):
    if check[TD[i][0]]==0:
        NOCHANGE.append(i)
        check[TD[i][0]]=1

NOCHANGE=set(NOCHANGE)
NETA=len(set(NETA))



NOWLIST=set(list(range(K)))
NOWLIST=sorted(list(NOWLIST-NOCHANGE))



NOCHANGE=sorted(list(NOCHANGE))
NOCHANSET=set(NOCHANGE)
ANS+=NETA**2

#print(NOCHANGE)
#print(NOWLIST)
#print(ANS)
#print(NETA)

for j in range(len(NOCHANGE)):
    if NOCHANGE[j]>K-1:
        break

#print(j)
i=K-1
L=len(NOCHANGE)
SCORE=ANS
while j<L:
    while i in NOCHANSET:
        i-=1

    if i<0:
        break


    SCORE+=TD[NOCHANGE[j]][1]-TD[i][1]-NETA**2+(NETA+1)**2
    if SCORE>ANS:
        ANS=SCORE
    #print(i,j,NETA,SCORE)
    NETA+=1
    j+=1
    i-=1


    #print(i,j)

print(ANS)

    
    



### FIXED CODE ###

N,K=map(int,input().split())
TD=[list(map(int,input().split())) for i in range(N)]
TD.sort(key=lambda x:x[1],reverse=True)

ANS=0

check=[0]*(10**5+1)
NOCHANGE=[]
NETA=[]

for i in range(K):
    ANS+=TD[i][1]
    NETA.append(TD[i][0])


for i in range(N):
    if check[TD[i][0]]==0:
        NOCHANGE.append(i)
        check[TD[i][0]]=1

NOCHANSET=set(NOCHANGE)
NETA=len(set(NETA))



#NOWLIST=set(list(range(K)))
#NOWLIST=sorted(list(NOWLIST-NOCHANSET))



NOCHANGE=sorted(list(NOCHANSET))

ANS+=NETA**2

#print(NOCHANGE)
#print(NOWLIST)
#print(ANS)
#print(NETA)

L=len(NOCHANGE)

for j in range(L):
    if NOCHANGE[j]>K-1:
        break
else:
    j=L
#print(j)
i=K-1

SCORE=ANS
#print(SCORE)
while j<L:
    while i in NOCHANSET:
        i-=1

    if i<0:
        break


    SCORE+=TD[NOCHANGE[j]][1]-TD[i][1]-NETA**2+(NETA+1)**2
    if SCORE>ANS:
        ANS=SCORE
    #print(i,j,NETA,SCORE)
    NETA+=1
    j+=1
    i-=1

    #print(SCORE)


    #print(i,j)

print(ANS)
from collections import deque

n, m = map(int, input().split())
l = [[] for i in range(n)]
union = []
vis = [-1]*n
ans = 0

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

q = deque()

def dfs(a):
    if vis[a] == -1:
        vis[a] = 0
        temp.append(a)
        for j in l[a]:
            q.append(j)
    if len(q) > 0:
        b = q.popleft()
        dfs(b)
    return temp

for i in range(n):
    temp = []
    union.append(dfs(i))

for i in union:
    ans = max(ans, len(i))

print(ans)

### FIXED CODE ###

from collections import deque

n, m = map(int, input().split())
l = [[] for i in range(n)]
union = []
vis = [-1]*n
ans = 0

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

q = deque()

for i in range(n):
    temp = []
    q.append(i)
    while q:
        a = q.popleft()
        if vis[a] == -1:
            vis[a] = 0
            temp.append(a)
            for j in l[a]:
                q.append(j)
    if len(temp) > 0:
        union.append(temp)


for i in union:
    ans = max(ans, len(i))

print(ans)
from collections import deque
import bisect


N = int(input())
a = list(map(int, input().split()))
uvs = [list(map(int, input().split())) for _ in range(N-1)]
shortest = [10e+10 for _ in range(N)]
shortest[0] = 0

routes = [[] for _ in range(N)]

for uv in uvs:
    routes[uv[0]-1].append(uv[1]-1)
    routes[uv[1]-1].append(uv[0]-1)

lis = [10e+100 for _ in range(N)]
minimum = [10e+100 for _ in range(N)]
seen = [False for _ in range(N)]
seen[0] = True

def function(checking):
    insert_posi = bisect.bisect_left(lis, a[checking])
    preserved = lis[insert_posi]
    lis[insert_posi] = a[checking]
    minimum[checking] = bisect.bisect_left(lis, 10e+50)
    for route in routes[checking]:
        if seen[route] == False:
            seen[route] = True
            shortest[route] = shortest[checking]+1
            function(route)
    lis[insert_posi] = preserved
    return
        
function(0)

minimum = [[minimum[i],shortest[i]] for i in range(N)]

minimum = sorted(minimum, key=lambda x:x[1])

[print(x[0]) for x in minimum]

### FIXED CODE ###

from collections import deque
import bisect
import sys

sys.setrecursionlimit(200000)

N = int(input())
a = list(map(int, input().split()))
uvs = [list(map(int, input().split())) for _ in range(N-1)]
shortest = [10e+10 for _ in range(N)]
shortest[0] = 0

routes = [[] for _ in range(N)]

for uv in uvs:
    routes[uv[0]-1].append(uv[1]-1)
    routes[uv[1]-1].append(uv[0]-1)

lis = [10e+100 for _ in range(N)]
minimum = [10e+100 for _ in range(N)]
seen = [False for _ in range(N)]
seen[0] = True

def function(checking):
    insert_posi = bisect.bisect_left(lis, a[checking])
    preserved = lis[insert_posi]
    lis[insert_posi] = a[checking]
    minimum[checking] = bisect.bisect_left(lis, 10e+50)
    for route in routes[checking]:
        if seen[route] == False:
            seen[route] = True
            shortest[route] = shortest[checking]+1
            function(route)
    lis[insert_posi] = preserved
    return
        
function(0)

[print(x) for x in minimum]
import numpy as np
n, k, q = input().split(' ')
n, k, q = int(n),int(k), int(q)
hum = [0]*n
for i in range(q):
    ind = input()
    hum[int(ind)] += 1
hum_last = np.array(hum)-q
for i in range(len(list(hum_last))):
    if hum_last[i] <= 0:
        print('No')
    else:
        print('Yes')

### FIXED CODE ###

import numpy as np
n, k, q = input().split(' ')
n, k, q = int(n),int(k), int(q)
hum = [k]*n
for i in range(q):
    ind = input()
    hum[int(ind)-1] += 1
hum_last = np.array(hum)-q
for i in range(len(hum_last)):
    if hum_last[i] <= 0:
        print('No')
    else:
        print('Yes')
def input_num(infile):
	num = int(infile.readline())
	return num

def makedict(infile,outfile,n):
	dict = {}
	for i in range(n):
		key,val = infile.readline().split()
		dict[key] = val
	m = input_num(sys.stdin)
	for j in range(m):
		x = infile.readline().sprit()[0]
		outfile.write(dict.get(x,x))
	print >> outfile

if __name__ == "__main__"
	import sys
	while True:
		n = input_num(sys.stdin)
		if n == 0:
			break
		makedict(sys.stdin,sys.stdout,n)

### FIXED CODE ###

def convert(infile, outfile, n):
    dictionary = {}
    for i in range(n):
        key, val = infile.readline().split()
        dictionary[key]=val
    m = int(infile.readline())
    for j in range(m):
        x = infile.readline().split()[0]
        outfile.write(dictionary.get(x, x))
    print >> outfile
 
def run(infile, outfile):
    while True:
        n = int(infile.readline())
        if n == 0:
            break
        convert(infile, outfile, n)
 
if __name__ == "__main__":
    import sys
    run(sys.stdin, sys.stdout)
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))
n,k = mi()
#a^-1 (mod P)
mod = 10 ** 9 +7
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def combination(n, r, mod=mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

'''
ここは任意
'''

g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, n + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

def main():
    if k >= n -1:
        ans = combination(2*n -1,n-1)
        print(ans)
    else:
        ans = 1
        for i in range(1,k+1):
            zero_comb = combination(n,i)
            cou = combination(n-1,n-i-1) * zero_comb % mod
            #print(cou)
            ans = (ans +cou) % mod
        print(ans)
main()


### FIXED CODE ###

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))
n,k = mi()
#a^-1 (mod P)
mod = 10 ** 9 +7
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def combination(n, r, mod=mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

'''
ここは任意
'''

g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

#  これは計算量rでncr mod p を求められる。
def combination2(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

for i in range( 2, n + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

def main():
    if k >= n -1:
        ans = combination2(2*n -1,n-1)
        print(ans)
    else:
        ans = 1
        for i in range(1,k+1):
            zero_comb = combination(n,i)
            cou = combination(n-1,n-i-1) * zero_comb % mod
            #print(cou)
            ans = (ans +cou) % mod
        print(ans)
main()
n = int(input())
a = list(map(int, input()))
b = list(map(int, input()))
monster = 0
for i in range(n):
  if b[i] <= a[i]:
    monster += b[i]
  elif b[i] <= a[i] + a[i+1]:
    monster += b[i]
    a[i+1] -= b[i] - a[i]
  else:
    monster += a[i] + a[i+1]
    a[i+1] = 0
print(monster)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
monster = 0
for i in range(n):
  if b[i] <= a[i]:
    monster += b[i]
  elif b[i] <= a[i] + a[i+1]:
    monster += b[i]
    a[i+1] -= b[i] - a[i]
  else:
    monster += a[i] + a[i+1]
    a[i+1] = 0
print(monster)
def main():
    import sys
    input = sys.stdin.readline
    s = input().strip()
    N = len(s)
    l = -1
    r = N
    while l < r:
        l += 1
        r -= 1
        while s[l] == 'x':
            l += 1
        while s[r] == 'x':
            r -= 1
        if s[l] != s[r]:
            print(-1)
            exit()
    
    ans = 0
    while l != -1 or r != N:
        if l == -1:
            ans += N - r
            break
        if r == N:
            ans += l + 1
            break
        if s[l] == s[r]:
            l -= 1
            r += 1
            continue
        elif s[l] == 'x':
            ans += 1
            l -= 1
        elif s[r] == 'x':
            ans += 1
            r += 1
        
    print(ans)

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    import sys
    input = sys.stdin.readline
    s = input().strip()
    N = len(s)
    l = -1
    r = N
    if len(set(s)) == 1:
        print(0)
        exit()
    while l < r:
        l += 1
        r -= 1
        while s[l] == 'x':
            l += 1
        while s[r] == 'x':
            r -= 1
        if s[l] != s[r]:
            print(-1)
            exit()
    
    ans = 0
    while l != -1 or r != N:
        if l == -1:
            ans += N - r
            break
        if r == N:
            ans += l + 1
            break
        if s[l] == s[r]:
            l -= 1
            r += 1
            continue
        elif s[l] == 'x':
            ans += 1
            l -= 1
        elif s[r] == 'x':
            ans += 1
            r += 1
        
    print(ans)

if __name__ == '__main__':
    main()
k = int(input())
a, b = map(int, input())

ans = 'NG'
if a % k == 0:
  ans = 'OK'
elif b % k == 0:
  ans = 'OK'
elif (b-a) / k > 0:
  ans = 'OK'
print(ans)

### FIXED CODE ###

k = int(input())
a, b = map(int, input().split())
 
ans = 'NG'
aa =  (a-1) // k
bb =  b // k
if(bb - aa) > 0:
    print('OK')
else:
    print('NG')
K, S = input().split()
K = int(K)

if len(S) <= K:
    print(S)
else:
    print(S[0:K] + '...')

### FIXED CODE ###

K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    S = S[0:K]+"..."
    print(S)
import statistics
N = int(input())

x = []
sub_x=[]
sub_y=[]


for i in range(N):
  x.append(list(map(int, input().split())))
  
x.sort()
#y.sort()
for i in range(len(x)-1,0, -1):
  mysub_x = [(x[i][0] - x[i-1][0])]
  mysub_y = [(x[i][1] - x[i-1][1])]
  if mysub_x != [0]:
    sub_x += mysub_x
  if mysub_y != [0]:
    sub_y += mysub_y


p = statistics.mode(sub_x)
#print(sub_x, p)
q = statistics.mode(sub_y)

ans = 0
for i in range(N-1):
    if abs(x[i][0] - x[i+1][0]) != abs(p) or abs(x[i][1] - x[i+1][1]) != abs(q):
      #print('dif')
      #print(ans, i)
      ans += 1

if ans == 0:
  print(1)
else:
  print(ans)  

### FIXED CODE ###

N = int(input())
xy_list = []
ans = []
 
for i in range(N):
    x,y = map(int,input().split())
    xy_list.append([x,y])

if N==1:
    print(1)
    exit(0)
xy_list.sort(key=lambda x:x[1]) #yの値でソート
xy_list.sort(key=lambda x:x[0]) #xの値でソート
#print(xy_list)
#差をすべて調べる
for i in range(N):
  for j in range(N):
    if( i==j ):     #xとyの重複はなし
      continue
    t = (xy_list[i][0]-xy_list[j][0],xy_list[i][1]-xy_list[j][1])
    ans.append(t)
    #print(ans)  
#差の種類ごとの個数を調べる
res = [ans.count(e) for e in set(ans)]
#Nから一番多かった差の個数を引いたものが答え
print(N-max(res))
a,b,t = map(int,input().split())
ans = 0
T = A
while(T<=t):
  ans += B
  T += A
print(ans)

### FIXED CODE ###

a,b,t = map(int,input().split())
ans = 0
T = a
while(T<=t):
  ans += b
  T += a
print(ans)
# coding: utf-8
import sys
#from operator import itemgetter
sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read
#from heapq import heappop, heappush
#from collections import defaultdict
sys.setrecursionlimit(10**7)
import math
#from itertools import product, accumulate, combinations, product
#import bisect
#import numpy as np
#from copy import deepcopy
#from collections import deque

INF = 1 << 50



def run():
    N, *A = map(float, read().split())
    M = [[0] * 19 for _ in range(19)]
    
    minus = 0
    for i, a in enumerate(A):
        a *= 10 ** 9
        a = int(a)
        f2 = 0
        f5 = 0
        while True:
            if not a % 2:
                f2 += 1
                a = a // 2
            else:
                break
        while True:
            if not a % 5:
                f5 += 1
                a = a // 5
            else:
                break
        A[i] = (min(f2, 18), min(f5, 18))
        M[f2][f5] += 1
        if f2 > 8 and f5 > 8:
            minus += 1
        
    
    #for m in M:
    #    print(m)
    
    for i in range(18, 0, -1):
        for j in range(18, -1, -1):
            M[i-1][j] += M[i][j]
    
    for i in range(18, -1, -1):
        for j in range(18, 0, -1):
            M[i][j-1] += M[i][j]

    ans = 0
    for f2, f5 in A:
        ans += M[max(18-f2, 0)][max(18-f5, 0)]
        
    print((ans-minus)//2)
    
    #for m in M:
    #    print(m)


if __name__ == "__main__":
    run()

### FIXED CODE ###

# coding: utf-8
import sys
#from operator import itemgetter
sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read
#from heapq import heappop, heappush
#from collections import defaultdict
sys.setrecursionlimit(10**7)
import math
#from itertools import product, accumulate, combinations, product
#import bisect
#import numpy as np
#from copy import deepcopy
#from collections import deque
from decimal import Decimal

INF = 1 << 50



def run():
    N = int(sysread())
    A = [Decimal(input()) for _ in range(N)]
    M = [[0] * 19 for _ in range(19)]
    #print(A)
    minus = 0
    
    MULT = 10 ** 9
    for i, a in enumerate(A):
        if a == int(a):
            minus += 1
        a *= MULT
        a = int(a)
        
        #print(a)
        f2 = 0
        f5 = 0
        while True:
            if not a % 2:
                f2 += 1
                a = a // 2
            else:
                break
        while True:
            if not a % 5:
                f5 += 1
                a = a // 5
            else:
                break
        A[i] = (min(f2, 18), min(f5, 18))
        M[min(f2, 18)][min(f5, 18)] += 1

        
    #print(A)
    #for m in M:
    #    print(m)
    
    for i in range(18, -1, -1):
        for j in range(18, -1, -1):
            if i > 0:
                M[i-1][j] += M[i][j]
                
    for i in range(18, -1, -1):
        for j in range(18, -1, -1):
            if j > 0:
                M[i][j-1] += M[i][j]

    ans = 0
    for f2, f5 in A:
        ans += M[max(18-f2, 0)][max(18-f5, 0)]
        
    print((ans-minus)//2)
    
    #for m in M:
    #    print(m)
    

if __name__ == "__main__":
    run()
import heapq

n, m = map(int, input().split())
a = map(int, input().split())
a = map(lambda x: -x, a)
heapq.heapify(a)

for i in range(m):
    tmp = -heapq.heappop(a) // 2
    heapq.heappush(a, -tmp)

print(-sum(a))


### FIXED CODE ###

import heapq

n, m = map(int, input().split())
a = [int(i) * (-1) for i in input().split()]
heapq.heapify(a)

for i in range(m):
    tmp = (heapq.heappop(a) * (-1)) // 2
    heapq.heappush(a, tmp * (-1))

print(sum(a) * (-1))
n=int(input())
a=list(input())
ans=''
for i in range(1,n+1):
    ans+=str(a.index(str(i))+1)+' '

print(ans)


### FIXED CODE ###

n=int(input())
if n%2==0:
	print(1/2)
else:
  	print((n-(n-1)/2)/n)
n = int(input())
l = list(map(int,input().split()))
l.sort(reverse = True)

if l[0] < sum(l[1:n]):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

s = input()
a = ['A','C','G','T']
c = 0
j = 0

for i in range(len(s)):
    if s[i] in a:
        j += 1
    else:
        if j > c:
            c = j
            j = 0

if j > c:
    print(j)
else:
    print(c)
n, k = map(int, input().split())
s = list(input())
if s[k-1] == 'A' :
  print(s[:k-2] + 'a' + s[k:n])
elif s[k-1] == 'B' :
  print(s[:k-2] + 'b' + s[k:n])
else s[k-1] == 'C' :
  print(s[:k-2] + 'c' + s[k:n])

### FIXED CODE ###

n, k = map(int, input().split())
s = input()
if s[k-1] == 'A':
  print(s[:k-1] + 'a' + s[k:])
elif s[k-1] == 'B':
  print(s[:k-1] + 'b' + s[k:])
else :
  print(s[:k-1] + 'c' + s[k:])
def resolve():
    import sys
    input = sys.stdin.readline
    k = int(input().rstrip())

    if k <= 9:
        # print(k)
        sys.exit()

    def judge(number_list, index, total):
        if index == len(number_list) - 2:  # 最後から2番目の桁
            num = number_list[index]
            add_num = 2 if num in (0, 9) else 3
            if (total + add_num) < k:
                total += add_num
                return total
            else:
                if num == 0:
                    right_nums = [num, num + 1]
                elif num == 9:
                    right_nums = [num-1,num]
                else:
                    right_nums = [num-1,num,num+1]
                number_list[-1] = right_nums[k-total-1]
                # print("".join(number_list))
                print(*number_list,sep="")
                sys.exit()
        else:  # 最後から２番目の桁じゃない
            num = number_list[index]
            if num == 0:
                right_nums = [num, num + 1]
            elif num == 9:
                right_nums = [num - 1, num]
            else:
                right_nums = [num - 1, num, num + 1]

            for right_num in right_nums:
                number_list[index+1] = right_num
                total = judge(number_list, index+1, total)
            return total

    total = 9
    num_list = [9]
    while True:
        num_list = [0 for _ in range(len(num_list)+1)]
        for left in [1,2,3,4,5,6,7,8,9]:
            num_list[0] = left
            # print(num_list, 0, total)
            total = judge(num_list, 0, total)




if __name__ == "__main__":
    resolve()


### FIXED CODE ###


def resolve():
    import sys
    input = sys.stdin.readline
    s = input().rstrip().split()
    print(s[2], s[0], s[1])
   
resolve()
r = (float)raw_input()

print r, r

### FIXED CODE ###

import math

r = float(input())

s = math.pi * r**2
l = 2.0*math.pi*r

print(s, l)
s=input()
    print(s[0]+str(len(s-2))+s[-1])

### FIXED CODE ###

n,m=[int(i) for i in input().split()]
print((n-1)*(m-1))
new_str, num, string = "", int(input()), input().split(" ")
for i in range(0, num):
    new_str += string[0][i] + string[1][i]
print(new_str)

### FIXED CODE ###

new_str, num, string = "", int(input()), input().split(" ")
for x in range(0, num):
    new_str += string[0][x] + string[1][x]
print(new_str)
N = int(input())
A = list(map(int, input().split(" ")))
abs_list = list(map(abc, A))
sort(abs_list)
pos = list(filter(lambda x: x > 0, A))
neg = list(filter(lambda x: x < 0, A))

# A has 0
if abs_list[0] == 0:
	print(sum(abs_list))
elif len(neg) % 2 == 0:
	print(sum(abs_list))
elif abs(pos[0]) < abs(neg[-1]):
	print(sum(abs_list) - 2*pos[0] - 2*neg[-1])
else:
	print(sum(pos) - sum(neg[:-1]))



### FIXED CODE ###

N = int(input())
A = list(map(int, input().split(" ")))
abs_list = list(map(abs, A))
abs_list.sort()
pos = list(filter(lambda x: x > 0, A))
neg = list(filter(lambda x: x < 0, A))
pos.sort()
neg.sort()

# A has 0
if abs_list[0] == 0:
	print(sum(abs_list))
elif len(neg) % 2 == 0:
	print(sum(abs_list))
elif len(pos) > 0 and abs(pos[0]) < abs(neg[-1]):
	print(sum(abs_list) - 2*pos[0])
else:
	print(sum(abs_list[1:])-abs_list[0])
N, M = map(int, input().split())
P, Y = zip(*(map(int, input().split()) for _ in range(M)))
ans = ['' for _ in range(M)]
c = [1 for _ in range(N + 1)]
for i, t in sorted(enumerate(zip(P, Y)), key=lambda t: t[1][1]):
    ans[i] = f'{t[0]:06}{c[t[0]]:06}'
    c[t[0]] += 1
print('\n'.join(ans))

### FIXED CODE ###

N, M = map(int, input().split())
P, Y = zip(*(map(int, input().split()) for _ in range(M)))
ans = ['' for _ in range(M)]
c = [1 for _ in range(N + 1)]
for i, t in sorted(enumerate(zip(P, Y)), key=lambda t: t[1][1]):
    ans[i] = '{:06}{:06}'.format(t[0], c[t[0]])
    c[t[0]] += 1
print('\n'.join(ans))