Harryxun/stf_run huggingface dataset:
s = Input()
r1 = s[0:4]
r2 = s[6:12]
r3 = s[14:]
print("{} {} {}".format(r1, r2, r3))

### FIXED CODE ###

a,b,c = map(str,input().split(","))
print(a + " " + b + " " + c)
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
d = b - a
e = v - w
f = d / e
if(d == 0):
    print("YES")
elif(d > 0):
    if(e == 0):
        print("NO")
    elif(d / e <= t and e > 0):
        print("YES")
    else:
        print("NO")
else:
    if(e == 0):
        print("NO")
    elif(d / (e*-1) <= t and (e*-1)>0):
        print("YES")
    else:
        print("NO")


### FIXED CODE ###

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
c = a + t * v
d = b + t * w


if(a > b):
    c = a - t * v
    d = b - t * w
    if(c <= d):
        print("YES")
    else:
        print("NO")
elif(a == b):
    print("YES")
else:
    c = a + t * v
    d = b + t * w
    if(c >= d):
        print("YES")
    else:
        print("NO")
s1 = [input().split()]
s1 = s1[::-1]
print("".join(s1))



### FIXED CODE ###

s1 = input().split()
s1 = s1[::-1]
print("".join(s1))
H, W = map(int, input().split())
S = [list(input()) for _ in range(H)]
ans = 0
for i in range(H):
    for j in range(W):
        if S[i][j] == '#':
            continue
        cnt = 1
        a = i
        b = j
        while a+1 <= H-1:
            if S[a+1][b] == '#':
                break
            cnt += 1
            a += 1
        a = i
        while a-1 >= 0:
            if S[a-1][b] == '#':
                break
            cnt += 1
            a -= 1
        a = i
        b = j
        while b+1 <= W-1:
            if S[a][b+1] == '#':
                break
            cnt += 1
            b += 1
        b = j
        while b-1 <= 0:
            if S[a][b-1] == '#':
                break
            cnt += 1
            b -= 1
        ans = max(ans, cnt)
print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.readline
import numpy as np

H, W = map(int, input().split())
S = np.array([list(input().rstrip()) for _ in range(H)]) == '.'
ups = np.zeros((H,W), dtype=int)
downs = np.zeros((H,W), dtype=int)
lefts = np.zeros((H,W), dtype=int)
rights = np.zeros((H,W), dtype=int)

for h in range(1, H):
    ups[h] = (ups[h-1] + 1) * S[h-1]
    downs[H-h-1] = (downs[H-h] + 1) * S[H-h]
for w in range(1, W):
    lefts[:, w] = (lefts[:, w-1] + 1) * S[:, w-1]
    rights[:, W-w-1] = (rights[:, W-w] + 1) * S[:, W-w]
print(np.amax((ups+downs+lefts+rights)*S)+1)
a,b,c = map(int, input().split())
 
if a**2 + 2*math.sqrt(a*b)+b**2 -c**2 < 0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

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

if (c-a-b)>0 and 4*a*b<(c-a-b)**2:
  print('Yes')
else:
  print('No')
from collections import defaultdict

N, M = map(int, input().split())
friend_info = [list(map(int, input().split())) for _ in range(M)]

relation_dict = {}
for person1, person2 in friend_info:
    add_flag = False
    for k, v in relation_dict.items():
        if((person1 in v) or (person2 in v)):
            relation_dict[k].add(person1)
            relation_dict[k].add(person2)
            add_flag = True
            break
    if(add_flag == False):
        new_key = str(len(relation_dict)+1)
        relation_dict[new_key] = {person1, person2}

max_group = max([len(relation) for relation in relation_dict.values()])

print(max_group)


### FIXED CODE ###

def find(target):
    if parent[target] < 0:
        return target
    else:
        parent[target] = find(parent[target])
        return parent[target]

def is_same(x, y):
    return find(x) == find(y)

def union(x, y):
    root_x = find(x)
    root_y = find(y)
    if root_x == root_y:
        return
    if parent[root_x] > parent[root_y]:
        root_x, root_y = root_y, root_x
    parent[root_x] += parent[root_y]
    parent[root_y] = root_x

# 今回これ使わないけど、どこに誰がいるのかはこれでわかる
def members(n, x):
    root = find(x)
    return [i for i in range(n) if find(i) == root]

def get_size(x):
    return -parent[find(x)]

def get_root():
    return [i for i, root in enumerate(parent) if root < 0]
n, m = map(int, input().split())
parent = [-1 for _ in range(n)]
for _ in range(m):
    a, b = map(lambda x: int(x) - 1, input().split())
    union(a, b)
ans = 0
for i in range(n):
    ans = max(ans, get_size(i))
print(ans)
a,b,c  = map(int, input().split())
d,e,f  = map(int, input().split())
g,h,i  = map(int, input().split())
n=int(input())
A = []
for i in range(n):
    A.append(int(input()))
if (a in A) and (b in A) and (c in A):
    print("Yes")
elif d in A and e in A and f in A:
    print("Yes")
elif g in A and h in A and i in A:
    print("Yes")
elif a in A and d in A and g in A:
    print("Yes")
elif b in A and e in A and h in A:
    print("Yes")
elif c in A and f in A and i in A:
    print("Yes")
elif a in A and e in A and i in A:
    print("Yes")
elif c in A and e in A and g in A:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n,m=map(int,input().split())
s = [0] * m
c = [0] * m
for i in range(m):
    s[i], c[i] = map(int, input().split())
k=["0"]*n
if m==0 and n==1:
    print(0)
elif m==0 and n!=1:
    print(10**(n-1))
else:
    for i in range(m):
        if k[s[i]-1]=="0":
            k[s[i]-1]=c[i]
        elif k[s[i]-1]==c[i]:
            k[s[i]-1]=c[i]
        else:
            print(-1)
            break

    else:
        t=0
        if k[0]=="0":
            k[0]=1
        if k[0]==0 and n==1:
            print(0)
        elif k[0]==0 and n!=1:
            print(-1)
        else:
            for i in range(n):
                t=t+10**(n-1-i)*int(k[i])
            print(t)
n, k = map(int, input().split())
a = list(map(int,input().split()))
timestamp = [0]*n
position = 1
period = 0
start=0
for i in range(n):
  if timestamp[position-1] != 0:
    start = timestamp[position-1]
    period = i-timestamp[position-1]
    break
  timestamp[position-1] =i
  position = a[position-1]
print(period,start)


if k <=start:
  position = 1
  for i in range(k-1):
    position = a[position-1]
  print(position)
  
else:
  cycle = (k-start)%period
  for i in range(cycle):
    position = a[position-1]
  print(position) 
  

### FIXED CODE ###

n, k = map(int, input().split())
a = list(map(int,input().split()))
timestamp = [0]*n
position = 1
period = 0
start=0
for i in range(n*2):
  if timestamp[position-1] != 0:
    start = timestamp[position-1]
    period = i-timestamp[position-1]
    break
  timestamp[position-1] =i
  position = a[position-1]
  

if k <=start:
  position = 1
  for i in range(k):
    position = a[position-1]
  print(position)
  
else:
  cycle = (k-start)%period
  for i in range(cycle):
    position = a[position-1]
  print(position)
a = sorted(input().split())
print(a[0] * a[1]

### FIXED CODE ###

a = sorted(input().split())
print(a[0] * int(a[1]))
def popcount(u):
    t = bin(u)
    h = t.count("1")
    return u % h 

n = int(input())
x = list(input())
c = x.count("1") + 1
d = c - 2

amaric = [1 % c]
amarid = [1 % d]
for i in range(n-1):
    amaric.append((amaric[-1]*2)%c)
    amarid.append((amarid[-1]*2)%d)

motoc = 0
motod = 0
for i in range(n):
    if x[i] == "1":
        motoc += amaric[n-1-i]
        motod += amarid[n-1-i]

for i in range(n):
    if x[i] == "0":
        op = motoc
        op += amaric[n-1-i]
        op %= c
    elif x[i] == "1":
        op = motod
        op -= amarid[n-1-i]
        op %= d
    cou = 1
    while True:
        if op == 0:
            break
        op = popcount(op)
        cou += 1
    print(cou)

### FIXED CODE ###

def popcount(u):
    t = bin(u)
    h = t.count("1")
    return u % h 

n = int(input())
x = list(input())
c = x.count("1") + 1
d = c - 2

amaric = [1 % c]
if d >= 1:
    amarid = [1 % d]
for i in range(n-1):
    amaric.append((amaric[-1]*2)%c)
    if d >= 1:
        amarid.append((amarid[-1]*2)%d)

motoc = 0
motod = 0
for i in range(n):
    if x[i] == "1":
        motoc += amaric[n-1-i]
        if d >= 1:
            motod += amarid[n-1-i]

for i in range(n):
    if x[i] == "0":
        op = motoc
        op += amaric[n-1-i]
        op %= c
    elif x[i] == "1":
        if d >= 1:
            op = motod
            op -= amarid[n-1-i]
            op %= d
        elif d == 0:
            print(0)
            continue
    cou = 1
    while True:
        if op == 0:
            break
        op = popcount(op)
        cou += 1
    print(cou)
a,b = input().split()

if (a + b[-1]) == b :

   print("Yes")

else:
   print("No")

### FIXED CODE ###

s = input()
t = input()

if (s + t[-1]) == t :
    print("Yes")

else :
    print("No")
n = map(int,input())
a = [int(input().split(sep=" ")[1])]
for i in range(n - 1):
    command = input()
    if(command == "deleteFirst"):
        a.pop(0)
    elif(command == "deleteLast"):
        a.pop()
    else:
        command,num = command.split(sep = " ")
        num = int(num)
        if(command == "delete"):
            a.remove(n)
        else:
            a.append(n)
for num in a:
    print(num,end=" ")
print()


### FIXED CODE ###

class Node(object):
    def __init__(self, num, prv = None, nxt = None):
        self.num = num
        self.prv = prv
        self.nxt = nxt
  
  
class DoublyLinkedList(object):
    def __init__(self):
        self.start = self.last = None
  
    def insert(self, num):
        new_elem = Node(num)
  
        if self.start is None:
            self.start = self.last = new_elem
        else:
            new_elem.nxt = self.start
            self.start.prv = new_elem
            self.start = new_elem
  
    def delete_num(self, target):
        it = self.start
        while it is not None:
            if it.num == target:
                if it.prv is None and it.nxt is None:
                    self.start = self.last = None
                else:
                    if it.prv is not None:
                        it.prv.nxt = it.nxt
                    else:
                        self.start = self.start.nxt
  
                    if it.nxt is not None:
                        it.nxt.prv = it.prv
                    else:
                        self.last = self.last.prv
                break
            it = it.nxt
  
    def delete_start(self):
        if self.start is self.last:
            self.start = self.last = None
        else:
            self.start.nxt.prv = None
            self.start = self.start.nxt
  
    def delete_last(self):
        if self.start is self.last:
            self.start = self.last = None
        else:
            self.last.prv.nxt = None
            self.last = self.last.prv
  
    def get_content(self):
        ret = []
        it = self.start
  
        while it is not None:
            ret.append(it.num)
            it = it.nxt
  
        return ' '.join(ret)
  
  
def _main():
    from sys import stdin
  
    n = int(input())
  
    lst = DoublyLinkedList()
      
    for _ in range(n):
        cmd = stdin.readline().strip().split()
        if cmd[0] == 'insert':
            lst.insert(cmd[1])
        elif cmd[0] == 'delete':
            lst.delete_num(cmd[1])
        elif cmd[0] == 'deleteFirst':
            lst.delete_start()
        elif cmd[0] == 'deleteLast':
            lst.delete_last()
  
    print(lst.get_content())
  
  
if __name__ == '__main__':
    _main()
mod1,mod2=10**9+7,998244353
mod=mod2
n,s=map(int,input().split())
dp=[0]*(s+1)
dp[0]=1
for a in map(int,input().split()):
    for i in range(s,a-1,-1):
        dp[i]=(dp[i]*2%mod+dp[i-a])%mod
    for i in range(a-1,-1,-1):
        dp[i]=2*dp[i]%mod
        
print(dp[-1])


### FIXED CODE ###

n,s=map(int,input().split())
dp=[0]*(s+1)
dp[0]=1
ne=[0]*(s+1)
mod=998244353
for i in list(map(int,input().split())):

    for k in range(0,s+1):
        if k+i<=s:
            ne[k+i]=(ne[k+i]+dp[k])%mod
        ne[k]=(ne[k]+2*dp[k])%mod
        dp[k]=0
    dp,ne=ne,dp
print(dp[-1])
import sys

def main():
    # input = sys.stdin.readline
    s = input()
    t = input()

    res = len(t)
    # 部分文字列の探索
    for i in range(len(s)-len(t)+1):
        diff = 0
        for j in range(len(t)):
            if s[i + j] != t[j]:
                diff += 1
        res = min(res, diff)
    print(res)
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys

def main():
    input = sys.stdin.readline
    d, t, s = map(int, input().split(" "))

    if s * t < d:
        print("No")
    else:print("Yes")


if __name__ == "__main__":
    main()
n = int(input())
a, b = [], []
for i in range(n):
	a[i], b[i] = map(int, input().split())

ans = 0
for i in range(n)[::-1]:
	a_, b_ = a[i] + ans, b[i]
	if a_%b_ != 0:
		ans += ((a_ // b_ + 1) * b_ - a_)

print(p)


### FIXED CODE ###

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

ans = 0
for i in range(n)[::-1]:
	a, b = ab[i][0]+ans, ab[i][1]
	if a%b != 0:
		ans += ((a//b + 1)*b - a)

print(ans)
n=int(input())
lists=list(map(int,input().split())
anslists=[0]*(n+1)

for i in range(n-1,-1,-1):
 # i= n-1, n-2......1,0
 #左からi+1番目に着いて調べる
    number=n//(i+1)
    if number==1:
          anslists[i]=lists[i]
    else:
        cnt=0
        check=0
        while cnt<=number-1:
           check+=anslists[i+cnt*(i+1)]
           cnt+=1
        nums=check-lists[i]
        if nums%2==0:
           anslists[i]=lists[i]
        elif nums%2!=0:
           if lists[i]==0:
               anslists[i]=1
           if lists[i]==1:
               anslists[i]=0
           
           
print(*anslists)
        
           
           
  

           
       
        
   
          
          


### FIXED CODE ###

n=int(input())
lists=list(map(int,input().split()))
lists.insert(0,0)
anslists=[0]*(n+1)
for j in range(n,0,-1):
# j=n,n-1,.......,2,1という感じ
    numbers=n//j
    if numbers==1:
        anslists[j]=lists[j]
    else:
        check=0
        for i in range(2,numbers+1):
            check+=anslists[i*j]
            
        if check%2==0:
            anslists[j]=lists[j]
            
        else:
            
            if lists[j]==1:
                anslists[j]=0
                
            if lists[j]==0:
                anslists[j]=1
                

printA=0

del anslists[0]


Anslist=[]
for k in range(n):
    if anslists[k]==1:
        printA+=1
        Anslist.append(k+1)
print(printA)
print(*Anslist)
a=int(input())
rint(["ABC","ARC","AGC"][(a>=1200)+(a>=2800)])

### FIXED CODE ###

a=int(input())
print(["ABC","ARC","AGC"][(a>=1200)+(a>=2800)])
def run(n, m, x, y, z):
    sum = [x[i] + y[i] + z[i] for i in range(n)]
    sum = sum.sort(reverse=True)
    return sum[0:m].sum()


def read_line():
    n, m = input().split()
    n = int(n)
    m = int(m)
    x = []
    y = []
    z = []
    for i in range(n):
        x[i], y[i], z[i] = input().split()
        x[i] = int(x[i])
        y[i] = int(y[i])
        z[i] = int(z[i])
    return (n, m, x, y, z)


def main():
    n, m, x, y, z = read_line()
    print(run(n, m, x, y, z))


if __name__ == '__main__':
    main()


### FIXED CODE ###

def run(n, m, x, y, z):
    s1 = [x[i] + y[i] + z[i] for i in range(n)]
    s1.sort(reverse=True)
    s2 = [-x[i] + y[i] + z[i] for i in range(n)]
    s2.sort(reverse=True)
    s3 = [x[i] - y[i] + z[i] for i in range(n)]
    s3.sort(reverse=True)
    s4 = [-x[i] - y[i] + z[i] for i in range(n)]
    s4.sort(reverse=True)
    s5 = [x[i] + y[i] - z[i] for i in range(n)]
    s5.sort(reverse=True)
    s6 = [-x[i] + y[i] - z[i] for i in range(n)]
    s6.sort(reverse=True)
    s7 = [x[i] - y[i] - z[i] for i in range(n)]
    s7.sort(reverse=True)
    s8 = [-x[i] - y[i] - z[i] for i in range(n)]
    s8.sort(reverse=True)
    max_sum = sum(s1[0:m])
    tmp_sum = sum(s2[0:m])
    if max_sum < tmp_sum:
        max_sum = tmp_sum
    tmp_sum = sum(s3[0:m])
    if max_sum < tmp_sum:
        max_sum = tmp_sum
    tmp_sum = sum(s4[0:m])
    if max_sum < tmp_sum:
        max_sum = tmp_sum
    tmp_sum = sum(s5[0:m])
    if max_sum < tmp_sum:
        max_sum = tmp_sum
    tmp_sum = sum(s6[0:m])
    if max_sum < tmp_sum:
        max_sum = tmp_sum
    tmp_sum = sum(s7[0:m])
    if max_sum < tmp_sum:
        max_sum = tmp_sum
    tmp_sum = sum(s8[0:m])
    if max_sum < tmp_sum:
        max_sum = tmp_sum
    return max_sum


def read_line():
    n, m = map(int, input().split())
    x = []
    y = []
    z = []
    for i in range(n):
        tx, ty, tz = map(int, input().split())
        x.append(tx)
        y.append(ty)
        z.append(tz)
    return (n, m, x, y, z)


def main():
    n, m, x, y, z = read_line()
    print(run(n, m, x, y, z))


if __name__ == '__main__':
    main()
# ABC 054 B

import sys

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

A = [input() for i in range(N)]
B = [input() for i in range(M)]

ret = [[] for i in range(M)]

for i in range(len(B)):
    for j in range(len(A)):
        f = -1
        while True:
            f = A[j].find(B[i], f+1)
            if f == -1:
                break

            ret[i].append((j, f))

flag = False

# ret = [[(1, 1)],
#        [(1, 1), (2, 1)]]

if M == 1 and len(ret[0] > 0):
    print('True')
    sys.exit(0)

for i in range(len(ret[0])):
    start = ret[0][i] # (x, y)

    for j in range(M-1):
        if not (start[0]+1, start[1]) in ret[j+1]:
            break
        if j == M-2:
            print('Yes')
            sys.exit(0)

print('No')


### FIXED CODE ###

import sys

def resolve():
    N, M = map(int, input().split())
    A = []
    for i in range(N):
        A.append(input())
    B = []
    for i in range(M):
        B.append(input())

    for i in range(N - M + 1):
        for j in range(N - M + 1):
            for k in range(M):
                if B[k] != A[i+k][j:j+M]:
                    break
                if k == M-1:
                    print('Yes')
                    return

    print('No')

if __name__ == "__main__":
    resolve()
N=int(input())
S=[input() for i in range(N)]
for v in ['AC','WA','TLE','RE']:
  print('{} x {}'.format(v,s.count(v)))

### FIXED CODE ###

N=int(input())
s=[input()  for i in range(N)]
for v in ['AC', 'WA', 'TLE','RE']:
  print('{0} x {1}'.format(v,s.count(v)))
import random

def AtCoderContestScheduling():

    Day = int(input())
    value_A = list(map(int,input().split()))
    
    SatisfactionLevel = [0]*26

    for num in range(Day):
        
        value_B = list(map(int,input().split()))
        
        if num == 0:
            SatisfactionLevel = [x + y for (x, y) in zip(SatisfactionLevel, value_B)]
            SumA = sum(value_A)
            SatisfactionLevel = [x - SumA + y for (x, y) in zip(SatisfactionLevel, value_A)]

            print(SatisfactionLevel.index(max(SatisfactionLevel)) + 1)

        else:
            SatisfactionLevel = [x + y for (x, y) in zip(SatisfactionLevel, value_B)]
            value_A_1 = value_A[value_A.index(max(value_A))] = 0
            SumA = sum(value_A)
            SatisfactionLevel = [x - (num + 1)*SumA + 2*y + z for (x, y, z) in zip(SatisfactionLevel, value_A, value_A_1)]

            print(SatisfactionLevel.index(max(SatisfactionLevel)) + 1)
            

if __name__ == '__main__':
    AtCoderContestScheduling()




### FIXED CODE ###

def AtCoderContestScheduling():

    Day = int(input())
    C_i = list(map(int,input().split()))
    
    last_d_i = [0]*26

    SatisfactionLevel_last = 0

    for num in range(1, Day+1):
        
        S_d_i = list(map(int,input().split()))
        
        SatisfactionLevel_list = []
        
        for num2 in range(26):
            SatisfactionLevel = SatisfactionLevel_last + S_d_i[num2]
            
            for num3 in range(26):
                if num2 != num3:
                    SatisfactionLevel = SatisfactionLevel - C_i[num3]*(num - last_d_i[num3])
 
            SatisfactionLevel_list.append(SatisfactionLevel)    

        index = SatisfactionLevel_list.index(max(SatisfactionLevel_list))

        last_d_i[index] = num

        SatisfactionLevel_last = SatisfactionLevel_list[SatisfactionLevel_list.index(max(SatisfactionLevel_list))]

        print(SatisfactionLevel_list.index(max(SatisfactionLevel_list)) + 1)

if __name__ == '__main__':
    AtCoderContestScheduling()
from math import inf
from sys import setrecursionlimit

setrecursionlimit(10 ** 6)


def larger(x, y):
    lx, ly = len(x), len(y)
    if lx > ly:
        return x
    elif lx < ly:
        return y
    else:
        x.sort(reverse=True)
        y.sort(reverse=True)
        for xx, yy in zip(x, y):
            if xx > yy:
                return x
            elif xx < yy:
                return y
        return x


def dfs(rest):
    res = []
    for use, number in d.items():
        if dp[rest - use] == dp[rest] - 1:
            res = larger(res, [number] + dfs(rest - use))
    return res


n, m = map(int, input().split())
a = tuple(map(int, input().split()))

needs = [inf, 2, 5, 5, 4, 5, 6, 3, 7, 6]
# needs[i] : 数字iを作るのに必要なマッチの本数

for i in range(1, 10):
    if i not in a:
        needs[i] = inf

d = {needs[i]: i for i in range(1, 10) if needs[i] != inf}
# d[本数] = その本数で作れる最大の数値

dp = [0] * (n + 1)
# dp[j] : j本から構成できる桁数の最大値

for j in range(2, n + 1):
    for use, number in d.items():
        if j - use >= 0:
            dp[j] = max(dp[j], dp[j - use] + 1)

for j in range(1, n + 1):
    if dp[j] == 0:
        dp[j] = -10
    else:
        break
# dp[j] == 0 となる点をdp[0]だけにすることで、
# if dp[now - use] == dp[now] - 1:
# で、最後0本にたどり着くようになる

ans = dfs(n)
ans.sort(reverse=True)
print(*ans, sep='')

### FIXED CODE ###

def chmax(x, y):
    if x == '-':
        return y

    lx = len(x)
    ly = len(y)
    if lx < ly:
        return y
    elif lx == ly:
        if x < y: return y
        else: return x
    else:
        return x


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

cnt = [N + 1, 2, 5, 5, 4, 5, 6, 3, 7, 6]
dp = ['-' for _ in range(N + 10 + 1)]
dp[0] = ''
# dp[j]: j 本使ってできる最大の数

for i in range(N + 1):
    # print(dp)
    if dp[i] == '-': continue
    for aa in a:
        dp[i + cnt[aa]] = chmax(dp[i + cnt[aa]], dp[i] + str(aa))

print(dp[N])
n = int(input())
a = [int(i) for i in input().split()]
sum_abs, min_abs, cnt_minus = 0, 10**9, 0
for ai in a:
    if ai < 0:
        cnt_minus += 1
    abs_ai = abs(ai)
    sum_abs += abs_ai
    if abs_ai < min_abs:
        min_abs = abs_ai
if cnt_minus % 2 == 0 or a in 0:
    print(sum_abs)
else:
    print(sum_abs - 2*min_abs)

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
sum_abs, min_abs, cnt_minus = 0, 10**9, 0
for ai in a:
    if ai < 0:
        cnt_minus += 1
    abs_ai = abs(ai)
    sum_abs += abs_ai
    if abs_ai < min_abs:
        min_abs = abs_ai
if cnt_minus % 2 == 0 or 0 in a:
    print(sum_abs)
else:
    print(sum_abs - 2*min_abs)