Harryxun/stf_run huggingface dataset:
n=int(input())
s=list(input())
k=int(input())
tmp=s[k]
for i in range(n):
  print(s[i],end="") if s[i]==tmp else print("*",end="")
print("")

### FIXED CODE ###

n=int(input())
s=list(input())
k=int(input())
tmp=s[k-1]
for i in range(n):
  print(s[i],end="") if s[i]==tmp else print("*",end="")
print("")
k,x=map(int,input().split())
print(*[x for x in range(X-K+1,X+K)])

### FIXED CODE ###

K,X=map(int,input().split())
print(*[x for x in range(X-K+1,X+K)])
from itertools import permutations

ABC = [input().rstrip(), input().rstrip(), input().rstrip()]

cache = [-1] * (3 * 3)


def canMatchShifted(index1, index2, shift):
    # Whether ABC[index1] can match with ABC[index2] shifted to the right by `shift`
    k = 3 * index1 + index2
    if cache[k] == -1:
        S1 = ABC[index1]
        S2 = ABC[index2]
        temp = [True] * (4001)
        for s in range(len(S1)):
            temp[s] = all(x == y or x == "?" or y == "?" for x, y in zip(S1[s:], S2))
        cache[k] = temp

    return cache[k][shift]


# Try all permutation orders of ABC
best = float("inf")
for a, b, c in permutations(range(3)):
    A = ABC[a]
    B = ABC[b]
    C = ABC[c]
    # Match A with `('?' * i) + B`
    for i in range(len(A) + 2):
        if not canMatchShifted(a, b, i):
            continue
        # Match B with `('?' * j) + C`
        # Match A with `('?' * (i + j)) + C`
        for j in range(len(B) + 2):
            if canMatchShifted(b, c, j) and canMatchShifted(a, c, i + j):
                l = max(len(A), i + len(B), i + j + len(C))
                best = min(best, l)
print(best)


### FIXED CODE ###

from itertools import permutations

ABC = [input().rstrip(), input().rstrip(), input().rstrip()]

cache = [-1] * (3 * 3)


def canMatchShifted(index1, index2, shift):
    # Whether ABC[index1] can match with ABC[index2] shifted to the right by `shift`
    k = 3 * index1 + index2
    if cache[k] == -1:
        S1 = ABC[index1]
        S2 = ABC[index2]
        temp = [True] * (4001)
        for s in range(len(S1)):
            temp[s] = all(x == y or x == "?" or y == "?" for x, y in zip(S1[s:], S2))
        cache[k] = temp

    return cache[k][shift]


# Try all permutation orders of ABC
best = float("inf")
for a, b, c in permutations(range(3)):
    A = ABC[a]
    B = ABC[b]
    C = ABC[c]
    # Match A with `('?' * i) + B`
    for i in range(2001):
        if not canMatchShifted(a, b, i):
            continue
        # Match B with `('?' * j) + C`
        # Match A with `('?' * (i + j)) + C`
        for j in range(2001):
            if canMatchShifted(b, c, j) and canMatchShifted(a, c, i + j):
                l = max(len(A), i + len(B), i + j + len(C))
                best = min(best, l)
print(best)
even = "#." * 151
odd = ".#" * 151
while 1:
    h,w = map(int,input().split())
    if h == w ==0:
        break
    for i in range(h//2):
        print(even[:w])
        print(odd[:w])
    if h%2 != 0:
        print(even[:w])

### FIXED CODE ###

even = "#." * 151
odd = ".#" * 151
while 1:
    h,w = map(int,input().split())
    if h == w ==0:
        break
    for i in range(h//2):
        print(even[:w])
        print(odd[:w])
    if h%2 != 0:
        print(even[:w])
    print()
# スペース区切りの整数の入力
p, q, r = map(int, raw_input().split())

n=max(p, q, r)

# 出力
Print str(p+q+r-n)


### FIXED CODE ###

p,q,r=map(int,input().split())
print(p+q+r-max(p,q,r))
print("ABC{}".format(int(input()))

### FIXED CODE ###

n = int(input())
print("ABC{}".format(n))
N, K = map(int, input().split())
S = input()
cnt1 = 0
cnt2 = 0
if len(S) == 1:
    print(0)
    exit()
p = 0
if 'L' == S[0]:
    for i in range(N):
        if 'L' == S[i]:
            p += 1
        else:
            ind = i
            if i == N-1:
                print(p-1)
                exit()
            break
else:
    for i in range(N):
        if 'R' == S[i]:
            p += 1
        else:
            ind = i
            if i == N-1:
                print(p-1)
                exit()
            break

ans = [1]
for i in range(ind, N):
    if S[i] == 'L':
        if cnt2:
            ans.append(2)
            cnt2 = 0
        cnt1 += 1
    else:
        if cnt1:
            ans.append(2)
            cnt1 = 0
        cnt2 += 1
if cnt1:
    ans.append(1)
else:
    ans.append(1)

ans.sort()
ans.reverse()

sums = 0
for i in range(N-1):
    if 'LL' == S[i:i+2]:
        sums += 1
    elif 'RR' == S[i:i+2]:
        sums += 1

if K >= len(ans):
    print(len(S) - 1)
else:
    if len(ans) == 0:
        print(len(S) - 1)
    if sums + sum(ans[:K]) >= len(S):
        print(len(S) - 1)
    else:
        print(sums + sum(ans[:K]))


### FIXED CODE ###

N, K = map(int, input().split())
S = input()
cnt1 = 0
cnt2 = 0
if len(S) == 1:
    print(0)
    exit()
p = 0
if 'L' == S[0]:
    for i in range(N):
        if 'L' == S[i]:
            p += 1
        else:
            ind = i
            if i == N-1:
                print(p-1)
                exit()
            break
else:
    for i in range(N):
        if 'R' == S[i]:
            p += 1
        else:
            ind = i
            if i == N-1:
                print(p-1)
                exit()
            break
if p == N:
    ind = N-1
ans = [1]
for i in range(ind, N):
    if S[i] == 'L':
        if cnt2:
            ans.append(2)
            cnt2 = 0
        cnt1 += 1
    else:
        if cnt1:
            ans.append(2)
            cnt1 = 0
        cnt2 += 1
if cnt1:
    ans.append(1)
else:
    ans.append(1)

ans.sort()
ans.reverse()

sums = 0
for i in range(N-1):
    if 'LL' == S[i:i+2]:
        sums += 1
    elif 'RR' == S[i:i+2]:
        sums += 1

if K >= len(ans):
    print(len(S) - 1)
else:
    if len(ans) == 0:
        print(len(S) - 1)
    if sums + sum(ans[:K]) >= len(S):
        print(len(S) - 1)
    else:
        print(sums + sum(ans[:K]))
n,m = map(int,input().split())
gcd = m//n
while n*gcd != m:
  gcd = M//n
  n = 1 + (M-1)//gcd
print(gcd)

### FIXED CODE ###

from itertools import product
from collections import Counter
from functools import reduce
import operator
num_product = lambda it: reduce(operator.mul,it,1)

# 素因数分解
def prime_factors(n):
  i = 2
  while i * i <= n:
    if n % i:
      i += 1
    else:
      n //= i
      yield i
  if n > 1:
    yield n



N,M = map(int,input().split())
P = tuple(tuple(p**i for i in range(d+1)) for p,d in Counter(prime_factors(M)).items())
def it():
  for nums in product(*P):
    t = num_product(nums)
    yield t
print(max(t for t in it() if t*N <= M))
from math import pow

def main():
    s = input()
    s = s[::-1]
    s_len = len(s)
    mod = 2019
    d = [0] * mod
    d[0] = 1
    rev_num = 0
    # 2以上なら共通するmodがあったということになる
    for i in range(s_len):
        rev_num += int(s[i]) * int(pow(10, i)%mod)
        rev_num %= mod
        d[rev_num] += 1
    # 2以上同じmodがあったらそこから2つ選ぶ選び方
    # それを全てのmodで
    print(sum(i*(i-1)//2 for i in d))
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    s = input()
    s_len = len(s)
    mod = 2019
    d = [0] * mod
    d[0] = 1
    rev_num = 0
    t = 1
    # 2以上なら共通するmodがあったということになる
    for i in reversed(s):
        rev_num += int(i) * t
        rev_num %= mod
        d[rev_num] += 1
        t *= 10
        t %= mod
    # 2以上同じmodがあったらそこから2つ選ぶ選び方
    # それを全てのmodで
    print(sum(i*(i-1)//2 for i in d))
 
if __name__ == '__main__':
    main()
# -*- coding:utf-8 -*-
import sys

def dfs(x, y, sym):
	tile[x][y] = "."
	for i in range(len(DX)):
		nx = x + DX[i]
		ny = y + DY[i]
		if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym:
			dfs(nx, ny, sym)

def solve():
	res = 0
	for i in range(N):
		for j in range(M):
			if tile[i][j] != ".":
				if tile[i][j] == "@":
					dfs(i, j, "@")
					res += 1
				elif tile[i][j] == "#":
					dfs(i, j, "#")
					res += 1
				elif tile[i][j] == "*":
					dfs(i, j, "*")
					res += 1
	print(res)

counter=0
DX = [-1, 0, 1, 0]
DY = [0, -1, 0, 1]
sys.setrecursionlimit(1000000)
tile = [[0 for i in range(1)] for j in range(1)]
while True:
	counter+=1
	line = input()
	if ' ' in line:
		nums = line.split(" ")
		N = int(nums[0])
		M = int(nums[1])
		tile = [[0 for i in range(N)] for j in range(M)]
	if N==0 and M==0:
		break
	else:
		tile[counter-2] = list(line)
	if (counter-1)==M:
		solve()
		counter = 0

### FIXED CODE ###

# -*- coding:utf-8 -*-
import sys
def dfs(x, y, sym):
	tile[x][y] = "."
	for i in range(len(DX)):
		nx = x + DX[i]
		ny = y + DY[i]
		if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym):
			dfs(nx, ny, sym)

def solve():
	res = 0
	for i in range(N):
		for j in range(M):
			sym = tile[i][j]
			if tile[i][j] != ".":
				if tile[i][j] is sym:
					dfs(i, j, sym)
					res += 1
	print(res)

counter=0
DX = [-1,0,1,0]
DY = [0,-1,0,1]
sys.setrecursionlimit(10**7)
while True:
	line = input()
	if " " in line:
		nums = line.split(" ")
		N = int(nums[0])
		M = int(nums[1])
		tile = [[0 for i in range(M)] for j in range(N)]
	else:
		tile[counter-1] = list(line)
	if N is 0 and M is 0:
		break
	counter += 1
	if counter-1 is N:
		solve()
		counter = 0
import math

N_H = list(map(int, input().split()))

a_b= [list(map(int, input().split())) for _ in range(N_H[0])]
length =len(a_b)

a= [a_b[i][0] for i in range(length)]
b= [a_b[i][1] for i in range(length)]

counter = 0
i = 0
pattern = 0


a_max = max(a)
a_max_idx = a.index(a_max)
b_a_max_idx = b[a_max_idx]

b.pop(a_max_idx)

b.sort()
b.reverse()

    
while True:
    if N_H[1] <= b[a_max_idx]:
        print(1)
        break
    
    if N_H[1] <= b_a_max_idx:
        counter += 1
        print(counter)
        break

    if i <= length-2:    
        if b[i] > a_max:
            N_H[1] -= b[i]

            i += 1

            counter += 1

            if N_H[1] <= 0:
                print(counter)
                break
        else:
            counter += math.ceil((N_H[1]-b_a_max_idx)/a_max)+1
            print(counter)
            break
    else:
            counter += math.ceil((N_H[1]-b_a_max_idx)/a_max)+1
            print(counter)
            break



### FIXED CODE ###

import math

N_H = list(map(int, input().split()))

a_b= [list(map(int, input().split())) for _ in range(N_H[0])]
length =len(a_b)

a= [a_b[i][0] for i in range(length)]
b= [a_b[i][1] for i in range(length)]

counter = 0
i = 0
pattern = 0


a_max = max(a)
b_max = max(b)
a_max_idx = a.index(a_max)
b_a_max_idx = b[a_max_idx]

b.pop(a_max_idx)

b.sort()
b.reverse()

    
while True:
    if N_H[1] <= b_max and counter == 0:
        counter += 1
        print(counter)
        break
    
    if N_H[1] <= b_a_max_idx:
        counter += 1
        print(counter)
        break

    if i <= length-2:    
        if b[i] > a_max:
            N_H[1] -= b[i]

            i += 1

            counter += 1

            if N_H[1] <= 0:
                print(counter)
                break
        else:
            counter += math.ceil((N_H[1]-b_a_max_idx)/a_max)+1
            print(counter)
            break
    else:
            counter += math.ceil((N_H[1]-b_a_max_idx)/a_max)+1
            print(counter)
            break
n = int(raw_input())
if n ==1:
	print 1
else:
	if not n%2:
	  print(0.500000000)
	else:
	  print((int(n/2)+1)/float(n))

### FIXED CODE ###

n = int(raw_input())
if n ==1:
	print 1
else:
	if not n%2:
	  print(0.500000000)
	else:
	  print((int(n/2)+1)/float(n))
print x**3

### FIXED CODE ###

x = raw_input()
print int(x)**3
N, M = map(int,input().split())
A = list(map(int,input().split()))
S = sum(A)
cnt = 0
for a in A:
	if a >= S / (4*M):
	cnt += 1
if cnt >= M:
	print("Yes")
else:
print("No")

### FIXED CODE ###

n,m=map(int,input().split())
b=list(map(int,input().split()))
s=sum(b)
a=[i for i in b if i>=s/(4*m)]
print("Yes" if len(a)>=m else "No")
n,m,x,y=map(int,input().split())
xt=list(map(int,input().split()))
yt=list(map(int,input().split()))
xt.sort()
yt.sort()
if x<y and xt[len(xt)-1]<y[0]:
  print("No War")
else:
  print("War")

### FIXED CODE ###

n,m,x,y=map(int,input().split())
xt=list(map(int,input().split()))
yt=list(map(int,input().split()))
xt.sort()
yt.sort()
if max(x,xt[len(xt)-1])<min(y,yt[0]):
  print("No War")
else:
  print("War")
import numpy as np
from scipy.ndimage.interpolation import shift

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

dp = [np.array([[0]*(N*A+1) for _ in range(N)])]

for i in range(N):
  new_dp = dp[-1]+ shift(dp[-1], [1, X[i]], cval=0)
  new_dp[0][X[i]]=new_dp[0][X[i]]+1
  
  dp.append(new_dp)
#print(dp[-1])
  
print(sum([dp[-1][i-1][i*A] for i in range(1,N+1)]))



### FIXED CODE ###

import numpy as np

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

dp = [np.array([[0]*(N*A+1) for _ in range(N+1)])]
#dp[0]: [0, 0]～[N, N*A]

for x in X:
  new_dp = dp[-1].copy()
  new_dp[1:, x:] += dp[-1][0:N, 0:N*A+1-x]
  if x<=N*A:
    new_dp[1, x] += 1
  
  dp.append(new_dp)
#print(dp[-1])
  
print(sum([dp[-1][i, i*A] for i in range(1, N+1)]))
import numpy as np
from numba import jit

@jit
def do():
    data = np.array(input().split(" "), dtype="int64")
    life = np.array(input().split(" "), dtype="int64")
    monsters = data[0]
    smash = data[1]
    if smash == 0:
        print(np.sum(life))
    elif smash >= monsters:
        print(0)
    else:
        a = np.sort(life)[-smash]
        leftover = np.where(life < a, life, 0)
        print(np.sum(leftover))

do()


### FIXED CODE ###

import numpy as np

def do():
    data = np.array(input().split(" "), dtype="int64")
    life = np.array(input().split(" "), dtype="int64")
    monsters = data[0]
    smash = data[1]
    if smash == 0:
        print(np.sum(life))
    elif smash >= monsters:
        print(0)
    else:
        a = np.sort(life)[-smash]
        leftover = np.where(life < a, life, 0)
        print(np.sum(leftover))

do()
import itertools
import pandas as pd

k, s = map(int, input().split())













### FIXED CODE ###

# coding: utf-8
# Your code here!

k, s = map(int, input().split())

cnt = 0

for i in range(k+1):
    for j in range(k+1):
        if s-i-j <= k and s-i-j>=0:
            cnt += 1

print(cnt)
n, k = map(int, input().split())
mod = 10 ** 9 + 7

def yakusuu(n):
    a = []
    for i in range(1, int(n ** 0.5)):
        if n % i == 0:
            a.append(i, n // i)
    return sum(a)

ans = 0
for i in range(1, k + 1):
    temp = 1
    for j in range(n):
        temp *= (k // i)
        temp %= mod
    ans += (i * 2 - yakusuu(i)) * temp
print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
mod = 10 ** 9 + 7

gcd = [0] * k
for i in range(k):
    test = k - i
    temp = 0
    for j in range(k // test):
        if j == 0:
            temp2 = 1
            temp3 = [k // test]
            for l in range(len(bin(n)) - 2):
                temp3.append(temp3[-1] ** 2 % mod)
            test3 = bin(n)
            for l in range(len(test3) - 2):
                if test3[-1-l] == "1":
                    temp2 *= temp3[l]
                    temp2 %= mod
            temp += temp2
        else:
            test2 = test * (j + 1)
            temp -= gcd[test2 - 1]
    gcd[test - 1] = temp
ans = 0
for i in range(k):
    ans += gcd[i] * (i + 1)
    ans %= mod
print(ans)
N,K,Q=map(int, input().split())
 
list=[(K-Q) for j in range(N)]
 
for i in range(Q):
	A=int(input())-1
  	list[A]+=1
 
for score in list:
  	if score>0:
      	print("Yes")
	else:
      	print("No")

### FIXED CODE ###

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

list=[(K-Q) for j in range(N)]

for i in range(Q):
    a=int(input())-1
    list[a]+=1

for score in list:
    if 0<score:
        print("Yes")
    else:
        print("No")
a,b,c = map(int,input().split())
lst = [a,b,c]
lst.sort()
res = True
if a==b-=c:
    print(-1)
else:
    while True:
        if a%2!=0 or b%2!=0 or c%2!=0:
            break
        else:
            res += 1
            nx_a = b//2 + c//2
            nx_b = a//2 + c//2
            nx_c = a//2 + b//2
            tmp = [nx_a, nx_b, nx_c]
            tmp.sort()
            if lst==tmp:
                print(-1)
                exit()
            a,b,c = nx_a, nx_b, nx_c
    print(res)

### FIXED CODE ###

a,b,c = map(int,input().split())
res = 0
while True:
    if a%2!=0 or b%2!=0 or c%2!=0:
        break
    elif a==b==c:
        res = -1
        break
    else:
        res += 1
        a,b,c = (b+c)//2, (c+a)//2, (a+b)//2
print(res)
# coding: utf-8

p, q, r = [int(x) for x in input().rstrip().split(" ")]

s = []
s[0] = p + q
s[1] = q + r
s[2] = r + p

print(min(s))


### FIXED CODE ###

# coding: utf-8

p, q, r = [int(x) for x in input().rstrip().split(" ")]

s = [0, 0, 0]
s[0] = p + q
s[1] = q + r
s[2] = r + p

print(min(s))
import collections

n = int(input())
x = input()

x_list = list(x)

num_dict = dict(collections.Counter(x_list))

num_of_1 = num_dict["1"]

for i in range(n):
    temp = x_list.copy()
    temp_num_of_1 = num_of_1 + 1 if temp[i] == "0" else num_of_1 - 1

    temp[i] = "1" if temp[i] == "0" else "0"

    ans = 0

    if temp_num_of_1 != 0:
        a = int("".join(temp), 2)

        a = a % temp_num_of_1

        temp = list(bin(a)[2:])

        ans += 1
    
        while temp.count("1") != 0:
            a = int("".join(temp), 2)

            a = a % temp.count("1")

            temp = list(bin(a)[2:])

            ans += 1

    print(ans)

### FIXED CODE ###

n = int(input())
x = input()

num_of_1 = x.count("1")

first = int(x, 2)

def f(x):
    if x == 0:
        return 0
    return 1 + f(x % bin(x).count('1'))

if num_of_1 == 1:
    for i in range(n):
        if x[i] == '1':
            print(0)
        elif i == n-1:
            print(2)
        else:
            print(1)
    exit()

first_one, first_zero = first % (num_of_1 - 1), first % (num_of_1 + 1)

for i in range(n):
    if x[i] == "0":
        print(1 + f((first_zero + pow(2, n-i-1, num_of_1 + 1)) % (num_of_1 + 1)))
    else:
        print(1 + f((first_one - pow(2, n-i-1, num_of_1 - 1)) % (num_of_1 - 1)))
from sympy import *

### FIXED CODE ###

k = [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]

i = int(input())
print(k[i - 1])
dp = [[0]*N for _ in range(N)] #i日目の活動をa,b,cで終えた幸福度のmax
dp[0][0] = abc[0][0]
dp[1][0] = abc[0][1]
dp[2][0] = abc[0][2]

def chmax(a,b):
    if a < b:
        return b
    else:
        return a 

for i in range(N-1):
    for k in range(3):
        for j in range(3):
            if j == k:
                pass
            else:
                dp[k][i+1] =  chmax(dp[k][i+1],dp[j][i]+abc[i+1][k])

ans = 0
for i in range(3):
    ans = chmax(ans,dp[i][N-1])
    
print(ans)
print(dp)

### FIXED CODE ###

#C
N = int(input())
abc = [list(map(int,input().split())) for _ in range(N)]
dp = [[0]*N for _ in range(3)] #i日目の活動をa,b,cで終えた幸福度のmax
dp[0][0] = abc[0][0]
dp[1][0] = abc[0][1]
dp[2][0] = abc[0][2]

def chmax(a,b):
    if a < b:
        return b
    else:
        return a 

for i in range(N-1):
    dp[0][i+1] =  chmax(dp[1][i]+abc[i+1][0],dp[2][i]+abc[i+1][0])
    dp[1][i+1] =  chmax(dp[0][i]+abc[i+1][1],dp[2][i]+abc[i+1][1])
    dp[2][i+1] =  chmax(dp[1][i]+abc[i+1][2],dp[0][i]+abc[i+1][2])


ans = chmax(dp[0][N-1],dp[1][N-1])
ans = chmax(ans,dp[2][N-1])
    
print(ans)
l = int(input())
print((l/3) ** 3)

### FIXED CODE ###

n, m = map(int, input().split())
print((n*(n-1))//2 + (m*(m-1)//2))
import sys

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for i in range(1, y):
  if x_list[i] < x_list[i - 1]:
    for j in range(0, i - 1):
      
      if x_list[0] > x_list[i]
        for p in range(0, i):
          q = i - p
          temp = x_list[i]
          x_list[q] = x_list[q - 1]
        x_list[0] = temp
      elif x_list[j] > x_list[i]:
        temp = x_list[i]
        for p in range(0, i):
          q = i - p
          x_list[q] = x_list[q - 1]
        x_list[j+1] = temp
  for k in range(0, y):
    print x_list[k],
  print " "

### FIXED CODE ###

import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)
N=input()
H=input()
W=input()
print((N-H+1)*(N-W+1))

### FIXED CODE ###

N=int(input())
H=int(input())
W=int(input())
print((N-H+1)*(N-W+1))
n =int(input())
cot =0

for i in range(1,n+1):
  if i%2= 1:
    ans+= 1
print(ans/ n)

### FIXED CODE ###

n =int(input())
ans =0

for i in range(1,n+1):
  if i%2== 1:
    ans+= 1
print(ans/ n)
import numpy as np
X = int(input())

t = np.arange(-1000000, 1000000, 1)
t = t**5
S = set(t)

for B in range(-1000000, 1000001, 1):
    if X+B**5 in S:
        print("%d %d"%((X+B**5)**0.2, B))
        break


### FIXED CODE ###

import numpy as np
X = int(input())

t = np.arange(0, 2000001, 1)
t = t**5
S = set(t)

for B in range(0,200001,1):
    if X+B**5 in S:
        print("%d %d"%((X+B**5)**0.2, B))
        break
    if X-B**5 in S:
        print("%d %d"%((X-B**5)**0.2, -B))
        break
import numpy as np
import sys
from functools import reduce
from operator import add, mul
 
N,K=map(int, input().split())
A =list(map(int,input().split()))
MOD = 10 ** 9 + 7
A=sorted(A)
if K%2==1 and A[-1]<0:
  ans0 = 1
  for a in A[N-K:N]:
    ans0 *= a
    ans0 %= MOD
  print(ans0)
  exit()
 
ansA = 1
for a in A[0:K]:
  ansA *= a
  ansA %= MOD
 
A=sorted(A, reverse=True)
ansB = 1
for a in A[0:K]:
  ansB *= a
  ansB %= MOD
 
A=sorted(A, key=lambda x:abs(x), reverse=True)
ansC = 1
for a in A[0:K]:
  ansC *= a
  ansC %= MOD
 
#print(ansA, ansB, ansC)
print(max(ansA, ansB, ansC)%MOD)
exit()
#print(factorial(0,30))
      
#A=sorted(A)
 
#Amin=factorial(0,K)
#if Amin<0 and 0 in A[K:N]:Amin=0
 
A=sorted(A, reverse=True)
 
Amax=factorial(0,K)
 
#A=sorted(A, key=lambda x: abs(x), reverse=True)
 
#B=A[0:K-1]
#C=A[K-1:N]
 
#Bmax=factorial(0,K-1)*C[0]
#print(factorial(0,K-1),C[0])
#print(Bmax)
 
#C=sorted(C)
#print(C)
#Bmin=factorial(0,K-1)*C[0]
#print(Bmin)
#print(Amax,Amin,Bmax,Bmin)
#print(max(Amax,Amin,Bmax,Bmin)%(10**9+7))
print(Amax)
import numpy as np
import sys
from functools import reduce
from operator import add, mul
 
N,K=map(int, input().split())
A =list(map(int,input().split()))
MOD = 10 ** 9 + 7
A=sorted(A)
if K%2==1 and A[-1]<0:
  ans0 = 1
  for a in A[N-K:N]:
    ans0 *= a
    ans0 %= MOD
  print(ans0)
  exit()

ansA = 1
for a in A[0:K]:
  ansA *= a
  if ansA>0:ansA %= MOD

A=sorted(A, reverse=True)
ansB = 1
for a in A[0:K]:
  ansB *= a
  if ansB>0:nsB %= MOD

A=sorted(A, key=lambda x:abs(x), reverse=True)
ansC = 1
for a in A[0:K]:
  ansC *= a
  if ansC>0:ansC %= MOD

#print(ansA, ansB, ansC)
print(max(ansA, ansB, ansC)%MOD)
exit()


### FIXED CODE ###

import math
N=int(input())
print(1000*math.ceil(N/1000)-N)