Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math
while True:
    n=int(input())
    a=[int(x) for x in input().split()]
    if n==0:
        break
    else:
        m=sum(a)/n
        print("{0:.8f}".format(math.sqrt(sum([(x-m)**2/n for x in a]))))

Fixed submission:
import math
while True:
    n = int(input())
    if n==0: break
    s = list(map(int,input().split()))
    m = sum(s)/float(n)
    print("{0:.8f}".format(math.sqrt(sum([(x-m)**2 for x in s])/n)))

Buggy python submission (verdict: Runtime Error):
5
70 80 100 90 20
3
80 80 80
0

Fixed submission:
import math
while True:
    n = int(input())
    if n==0: break
    s = list(map(int,input().split()))
    m = sum(s)/float(n)
    print("{0:.8f}".format(math.sqrt(sum([(x-m)**2 for x in s])/n)))

Buggy python submission (verdict: Runtime Error):
import math
while True:
    n=int(input())
    a=list(map(int,input().spli()))
    if int(n)==0:
        break
    else:
        m=sum(a)/float(n)
        print("{0:.8f}".format(math.sqrt(sum([(x-m)**2/n for x in a]))))
    

Fixed submission:
import math
while True:
    n = int(input())
    if n==0: break
    s = list(map(int,input().split()))
    m = sum(s)/float(n)
    print("{0:.8f}".format(math.sqrt(sum([(x-m)**2 for x in s])/n)))

Buggy python submission (verdict: Runtime Error):
import math
while True:
    n=int(input())
    a=list(map(int,input().split()))
    if int(n)==0:
        break
    else:
        m=sum(a)/float(n)
        print("{0:.8f}".format(math.sqrt(sum([(x-m)**2/n for x in a]))))
    

Fixed submission:
import math
while True:
    n = int(input())
    if n==0: break
    s = list(map(int,input().split()))
    m = sum(s)/float(n)
    print("{0:.8f}".format(math.sqrt(sum([(x-m)**2 for x in s])/n)))

Buggy python submission (verdict: Runtime Error):
import math
while True:
    n=int(input())
    a=list(map(int,input().split()))
    if n==0:
        break
    else:
        m=sum(a)/float(n)
        print("{0:.8f}".format(math.sqrt(sum([(x-m)**2/n for x in a]))))

Fixed submission:
import math
while True:
    n = int(input())
    if n==0: break
    s = list(map(int,input().split()))
    m = sum(s)/float(n)
    print("{0:.8f}".format(math.sqrt(sum([(x-m)**2 for x in s])/n)))

Buggy python submission (verdict: Runtime Error):
import math
while True:
    n=int(input())
    a=list(map(int,input().split()))
    if n==0:
        break
    m=sum(a)/float(n)
    print("{0:.8f}".format(math.sqrt(sum([(x-m)**2/n for x in a]))))

Fixed submission:
import math
while True:
    n = int(input())
    if n==0: break
    s = list(map(int,input().split()))
    m = sum(s)/float(n)
    print("{0:.8f}".format(math.sqrt(sum([(x-m)**2 for x in s])/n)))
Buggy python submission (verdict: Runtime Error):
n=int(input())
vector1=[int(x) for x in input().split()]
vector2=[int(x) for x in input().split()]
for i in range(1,4):
print("{0:.8f}".format(sum([abs(a-b)**p for a,b in zip(vector1,vector2)])**(1/p)))
print("{0:.8f}".format(max([abs(a-b) for a,b in zip(vector1,vector2)])))

Fixed submission:
n=int(input())
vector1=[int(x) for x in input().split()]
vector2=[int(x) for x in input().split()]
for i in range(1,4):
    print("{0:.8f}".format(sum([abs(a-b)**i for a,b in zip(vector1,vector2)])**(1/i)))
print("{0:.8f}".format(max([abs(a-b) for a,b in zip(vector1,vector2)])))

Buggy python submission (verdict: Runtime Error):
n=int(input())
vector1=[int(x) for x in input().split()]
vector2=[int(x) for x in input().split()]
for i in range(1,4):
    print("{0:.8f}".format(sum([abs(a-b)**p for a,b in zip(vector1,vector2)])**(1/p)))
    print("{0:.8f}".format(max([abs(a-b) for a,b in zip(vector1,vector2)])))

Fixed submission:
n=int(input())
vector1=[int(x) for x in input().split()]
vector2=[int(x) for x in input().split()]
for i in range(1,4):
    print("{0:.8f}".format(sum([abs(a-b)**i for a,b in zip(vector1,vector2)])**(1/i)))
print("{0:.8f}".format(max([abs(a-b) for a,b in zip(vector1,vector2)])))

Buggy python submission (verdict: Runtime Error):
n=int(input())
vector1=[int(x) for x in input().split()]
vector2=[int(x) for x in input().split()]
for i in range(1,4):
    print("{0:.8f}".format(sum([abs(a-b)**p for a,b in zip(vector1,vector2)])**(1/i)))
    print("{0:.8f}".format(max([abs(a-b) for a,b in zip(vector1,vector2)])))

Fixed submission:
n=int(input())
vector1=[int(x) for x in input().split()]
vector2=[int(x) for x in input().split()]
for i in range(1,4):
    print("{0:.8f}".format(sum([abs(a-b)**i for a,b in zip(vector1,vector2)])**(1/i)))
print("{0:.8f}".format(max([abs(a-b) for a,b in zip(vector1,vector2)])))
Buggy python submission (verdict: Runtime Error):
print(x**3)

Fixed submission:
x=input()
print(x**3
)

Buggy python submission (verdict: Runtime Error):
x**3

Fixed submission:
x=input()
print(x**3
)
Buggy python submission (verdict: Runtime Error):
(a,b)=map(int(),input().split())
print(a*b,(a+b)*2)

Fixed submission:
[a,b]=map(int,input().split())
print(a*b,(a+b)*2)

Buggy python submission (verdict: Runtime Error):
[a,b]=map(int,raw_input().split())
print(a*b,(a+b)*2)

Fixed submission:
[a,b]=map(int,input().split())
print(a*b,(a+b)*2)

Buggy python submission (verdict: Runtime Error):
a,b=map(int,raw_input().split())
print(a*b,(a+b)*2)

Fixed submission:
[a,b]=map(int,input().split())
print(a*b,(a+b)*2)

Buggy python submission (verdict: Runtime Error):
a,b=map(int,raw_input().split())
print a*b,(a+b)*2

Fixed submission:
[a,b]=map(int,input().split())
print(a*b,(a+b)*2)

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print a*b,(a+b)*2

Fixed submission:
[a,b]=map(int,input().split())
print(a*b,(a+b)*2)

Buggy python submission (verdict: Runtime Error):
[a,b]=map(int,input().split())
print(a*b,(a+b)*)

Fixed submission:
[a,b]=map(int,input().split())
print(a*b,(a+b)*2)
Buggy python submission (verdict: Runtime Error):
S=input()
h,r1=S//3600,S%3600
m,s=r1//60,r1%60
print("h:m:s")

Fixed submission:
S=int(input())
print(S//3600,(S%3600)//60,S%60,sep=":")

Buggy python submission (verdict: Runtime Error):
S=input()
h,r1=S//3600,S%3600
m,s=r1//60,r1%60
print("h:m:s")

Fixed submission:
S=int(input())
print(S//3600,(S%3600)//60,S%60,sep=":")

Buggy python submission (verdict: Runtime Error):
n=input()
h,r1=n//3600,n%3600
m,s=r1//60,r1%60
print("h:m:s")

Fixed submission:
S=int(input())
print(S//3600,(S%3600)//60,S%60,sep=":")

Buggy python submission (verdict: Runtime Error):
n=int(input())
print(":".join(map(str,[n/3600,n%3600/60,n%60]))

Fixed submission:
S=int(input())
print(S//3600,(S%3600)//60,S%60,sep=":")

Buggy python submission (verdict: Runtime Error):
S=input()
print(':'.join(map(str,[S/3600,S%3600/60,S%60])))

Fixed submission:
S=int(input())
print(S//3600,(S%3600)//60,S%60,sep=":")

Buggy python submission (verdict: Runtime Error):
n=input()
print(':'.join(map(str,[n/3600,n%3600/60,n%60])))

Fixed submission:
S=int(input())
print(S//3600,(S%3600)//60,S%60,sep=":")

Buggy python submission (verdict: Runtime Error):
n=input()
print(':'.join(map(str,[n/3600,n%3600/60,n%60])))

Fixed submission:
S=int(input())
print(S//3600,(S%3600)//60,S%60,sep=":")
Buggy python submission (verdict: Runtime Error):
[a.b]=map(int,input().split( ))
if a>b:
 print("a>b")
elif a<b:
 print("a<b")
else:
 print("a=b")

Fixed submission:
a,b=[int(x) for x in input().split()]
op = ">" if a > b else "<" if a < b else "=="
print("a",op,"b")

Buggy python submission (verdict: Runtime Error):
[a.b]=map(int,input().split())
if a>b:
 print("a>b")
elif a<b:
 print("a<b")
else:
 print("a=b")

Fixed submission:
a,b=[int(x) for x in input().split()]
op = ">" if a > b else "<" if a < b else "=="
print("a",op,"b")

Buggy python submission (verdict: Runtime Error):
[a.b]=map(int,input().split( ))
if a>b:
 print("a>b")
elif a<b:
 print("a<b")
else:
 print("a==b")

Fixed submission:
a,b=[int(x) for x in input().split()]
op = ">" if a > b else "<" if a < b else "=="
print("a",op,"b")

Buggy python submission (verdict: Runtime Error):
[a.b]=map(int,raw_input().split( ))
if a>b:
 print("a>b")
elif a<b:
 print("a<b")
else:
 print("a=b")

Fixed submission:
a,b=[int(x) for x in input().split()]
op = ">" if a > b else "<" if a < b else "=="
print("a",op,"b")

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input.split())
op = ">" if a > b else "<" if a < b else "=="
print("a",op,"b")

Fixed submission:
a,b=[int(x) for x in input().split()]
op = ">" if a > b else "<" if a < b else "=="
print("a",op,"b")
Buggy python submission (verdict: Runtime Error):
[a,b,c]=int(x) for x in input().split
if a>b and b>c:
 print("Yes")
else:
 print("No")

Fixed submission:
[a,b,c]=[int(x) for x in input().split()]
if a<b<c:
 print("Yes")
else:
 print("No")

Buggy python submission (verdict: Runtime Error):
[a,b,c]=[int(x) for x in input().split]
if a>b and b>c:
 print("Yes")
else:
 print("No")

Fixed submission:
[a,b,c]=[int(x) for x in input().split()]
if a<b<c:
 print("Yes")
else:
 print("No")

Buggy python submission (verdict: Runtime Error):
[a,b,c]=[int(x) for x in input().split]
if a<b<c:
 print("Yes")
else:
 print("No")

Fixed submission:
[a,b,c]=[int(x) for x in input().split()]
if a<b<c:
 print("Yes")
else:
 print("No")
Buggy python submission (verdict: Runtime Error):
sorted([int(x) for x in input().split(()])

Fixed submission:
list=sorted([int(x) for x in input().split()])
print(str(list[0])+" "+str(list[1])+" "+str(list[2]))

Buggy python submission (verdict: Runtime Error):
sorted([int(x) for x in input().split()])
print(sorted[0]+" "+sorted[1]+" "+sorted[2])

Fixed submission:
list=sorted([int(x) for x in input().split()])
print(str(list[0])+" "+str(list[1])+" "+str(list[2]))

Buggy python submission (verdict: Runtime Error):
list=sorted([int(x) for x in input().split()])
print(list[0]+" "+list[1]+" "+list[2])

Fixed submission:
list=sorted([int(x) for x in input().split()])
print(str(list[0])+" "+str(list[1])+" "+str(list[2]))
Buggy python submission (verdict: Runtime Error):
[W,H,x,y,r]=[int(x) for x in input().split()]
if (abs(x)=>r and abs(W-x)=>r) and (abs(y)=>r and abs(H-y)=>r):
    print("Yes")
else:
    print("No")

Fixed submission:
W,H,x,y,r=[int(x) for x in input().split()]
print("No" if x < r or y < r or (x+r) > W or (y+r) > H else "Yes")

Buggy python submission (verdict: Runtime Error):
[W,H,x,y,r]=[int(x) for x in input().split()]
if (0=<x=<W) and (0=<y=<H):
    print("Yes")
else:
    print("No")

Fixed submission:
W,H,x,y,r=[int(x) for x in input().split()]
print("No" if x < r or y < r or (x+r) > W or (y+r) > H else "Yes")
Buggy python submission (verdict: Runtime Error):
a=1
while 1:
    i = int(raw_input())
    if i == 0:
        break
    else:
        print 'Case %d: %d'%(a, i)
        a += 1

Fixed submission:
a=1
while True:
    i=int(input())
    if i==0:
        break
    else:
        print("Case {0:d}: {1:d}".format(a,i))
        a=a+1
Buggy python submission (verdict: Runtime Error):
a=[]
while True:
    if [0,0]=[int(x) for x in input().split()]:
        break
    else:
        [a,b]=sorted([int(x) for x in input().split()])
        print("a b c")

Fixed submission:
while True:
    list=[int(x) for x in input().split()]
    if any(list):
        [a,b]=sorted(list)
        print(str(a)+" "+str(b))
    else:
        break

Buggy python submission (verdict: Runtime Error):
while True:
    if any([int(x) for x in input().split()]):
        [a,b]=sorted([int(x) for x in input().split()])
        print("a b")
    else:
        break

Fixed submission:
while True:
    list=[int(x) for x in input().split()]
    if any(list):
        [a,b]=sorted(list)
        print(str(a)+" "+str(b))
    else:
        break
Buggy python submission (verdict: Runtime Error):
import math
C=math.pi
print("{0:.6f} {1:.6f}").format(C*r**2,C*2*r)

Fixed submission:
import math
r=float(input())
C=math.pi
print("{0:.6f} {1:.6f}".format(C*r**2,C*2*r))

Buggy python submission (verdict: Runtime Error):
import math
r=float(input())
C=math.pi
print("{0:.6f} {1:.6f}").format(C*r**2,C*2*r)

Fixed submission:
import math
r=float(input())
C=math.pi
print("{0:.6f} {1:.6f}".format(C*r**2,C*2*r))
Buggy python submission (verdict: Time Limit Exceeded):
[a,op,b]=[x for x in input().split()]
a=int(a)
b=int(b)
while True:
    if a==0 and b==0:
        break
    elif op=="+":
        print(a+b)
    elif op=="-":
        print(a-b)
    elif op=="*":
        print(a*b)
    else:
        print(a//b)

Fixed submission:
while True:
    [a,b,c]=[x for x in input().split()]
    [a,c]=[int(a),int(c)]
    op=b
    if op=="?":
        break
    elif op=="+":
        print(a+c)
    elif op=="-":
        print(a-c)
    elif op=="*":
        print(a*c)
    else:
        print(a//c)

Buggy python submission (verdict: Runtime Error):
while True:
    [a,b,c]=[x for x in input().split()]
    a,b=int(a),int(b)
    if a==0 and b==0:
        break
    elif op=="+":
        print(a+b)
    elif op=="-":
        print(a-b)
    elif op=="*"
        print(a*b)
    else:
        print(a//b)

Fixed submission:
while True:
    [a,b,c]=[x for x in input().split()]
    [a,c]=[int(a),int(c)]
    op=b
    if op=="?":
        break
    elif op=="+":
        print(a+c)
    elif op=="-":
        print(a-c)
    elif op=="*":
        print(a*c)
    else:
        print(a//c)

Buggy python submission (verdict: Runtime Error):
while True:
    [a,b,c]=[x for x in input().split()]
    [a,c]=[int(a),int(c)]
    print("processing")
    if a==0 and c==0:
        break
    elif op=="+":
        print(a+c)
    elif op=="-":
        print(a-c)
    elif op=="*":
        print(a*c)
    else:
        print(a//c)

Fixed submission:
while True:
    [a,b,c]=[x for x in input().split()]
    [a,c]=[int(a),int(c)]
    op=b
    if op=="?":
        break
    elif op=="+":
        print(a+c)
    elif op=="-":
        print(a-c)
    elif op=="*":
        print(a*c)
    else:
        print(a//c)

Buggy python submission (verdict: Runtime Error):
while True:
    [a,b,c]=[x for x in input().split()]
    [a,c]=[int(a),int(c)]
    op=b
    if a==0 and c==0:
        break
    elif op=="+":
        print(a+c)
    elif op=="-":
        print(a-c)
    elif op=="*":
        print(a*c)
    else:
        print(a//c)

Fixed submission:
while True:
    [a,b,c]=[x for x in input().split()]
    [a,c]=[int(a),int(c)]
    op=b
    if op=="?":
        break
    elif op=="+":
        print(a+c)
    elif op=="-":
        print(a-c)
    elif op=="*":
        print(a*c)
    else:
        print(a//c)

Buggy python submission (verdict: Runtime Error):
while True:
    [a,b,c]=[x for x in input().split()]
    [a,c]=[int(a),int(c)]
    op=b
    if op==?:
        break
    elif op=="+":
        print(a+c)
    elif op=="-":
        print(a-c)
    elif op=="*":
        print(a*c)
    else:
        print(a//c)

Fixed submission:
while True:
    [a,b,c]=[x for x in input().split()]
    [a,c]=[int(a),int(c)]
    op=b
    if op=="?":
        break
    elif op=="+":
        print(a+c)
    elif op=="-":
        print(a-c)
    elif op=="*":
        print(a*c)
    else:
        print(a//c)
Buggy python submission (verdict: Runtime Error):
n=int(input())
list=sorted([int(x) for x in input().split()])
print(a[0],a[-1],sum(list))

Fixed submission:
n=int(input())
list=sorted([int(x) for x in input().split()])
print(list[0],list[-1],sum(list))
Buggy python submission (verdict: Runtime Error):
while True:
    [H,W]=[int(x) for x in input().split()]
    if [H,W]==[0,0]:
        break
    unit="#."
    for i in range(0,H):
        print(unit*(W/2)+unit[0]*(W%2))
        unit=unit[1]+unit[0]
    print("")

Fixed submission:
while True:
    [H,W]=[int(x) for x in input().split()]
    if [H,W]==[0,0]:
        break
    unit="#."
    for i in range(0,H):
        print(unit*(W//2)+unit[0]*(W%2))
        unit=unit[1]+unit[0]
    print("")
Buggy python submission (verdict: Runtime Error):
while True:
    [a,b,c]=[x for x in input().split()]
    a,b=int(a),int(b)
    if a==0 and b==0:
        break
    elif op=="+":
        print(a+b)
    elif op=="-":
        print(a-b)
    elif op=="*":
        print(a*b)
    else:
        print(a//b)

Fixed submission:
n=int(input())
record=[[[0 for r in range(10)] for f in range(3)] for b in range(4)]
for i in range(n):
    b,f,r,v=[int(x) for x in input().split()]
    record[b-1][f-1][r-1]+=v
for b in range(4):
    for f in record[b]:
        print(" "+" ".join([str(x) for x in f]))
    if b!=3:
        print("".join(["#" for x in range(20)]))
Buggy python submission (verdict: Runtime Error):
n,m=[int(x) for x in input().split()]
A=[[0 for i in range(m)] for i in range(m)]
vector=[0 for i in range(m)]
result=[0 for i in range(n)]
for i in range(n):
    A[i]=[int(x) for x in input().split()]
for i in range(m):
    vector[i]=int(input())

for i in range(n):
    for j in range(m):
        result[i] += A[i][j]*vector[j]

for _ in result:
    print(_)

Fixed submission:
n,m=[int(x) for x in input().split()]
A=[[0 for i in range(m)] for i in range(n)]
vector=[0 for i in range(m)]
result=[0 for i in range(n)]
for i in range(n):
    A[i]=[int(x) for x in input().split()]
for i in range(m):
    vector[i]=int(input())
for i in range(n):
    for j in range(m):
        result[i] += A[i][j]*vector[j]
for _ in result:
    print(_)

Buggy python submission (verdict: Runtime Error):
n,m=[int(x) for x in input().split()]
A=[[0 for i in range(m)] for i in range(m)]
vector=[0 for i in range(m)]
result=[0 for i in range(n)]
for i in range(n):
    A[i]=[int(x) for x in input().split()]
for i in range(m):
    vector[i]=int(input())

for i in range(n):
    for j in range(m):
        result[i] += A[i][j]*vector[j]

for _ in result:
    print(_)

Fixed submission:
n,m=[int(x) for x in input().split()]
A=[[0 for i in range(m)] for i in range(n)]
vector=[0 for i in range(m)]
result=[0 for i in range(n)]
for i in range(n):
    A[i]=[int(x) for x in input().split()]
for i in range(m):
    vector[i]=int(input())
for i in range(n):
    for j in range(m):
        result[i] += A[i][j]*vector[j]
for _ in result:
    print(_)
Buggy python submission (verdict: Runtime Error):
s=input()
p=input()
print("Yes" if p in s+s)

Fixed submission:
s=input()
p=input()
print("Yes" if p in s+s else "No")
Buggy python submission (verdict: Runtime Error):
import math
a,b,c = map(float, raw_input().split())
cc = math.radians(c)
h = b * math.sin(cc)
S = a * h / 2
L = a + b + math.sqrt(h**2 + (a-b*math.cos(cc))**2)
print("{0:.5f}\n{1:.5f}\n{2:.5f}\n".format(S, L, h))

Fixed submission:
import math
a,b,c = map(float, input().split())
cc = math.radians(c)
h = b * math.sin(cc)
S = a * h / 2
L = a + b + math.sqrt(h**2 + (a-b*math.cos(cc))**2)
print("{0:.10f}\n{1:.10f}\n{2:.10f}\n".format(S, L, h))
Buggy python submission (verdict: Runtime Error):
import statistics
while 0!=int(input()):
	s = list(map(int, input().split()))
	print(statistics.stdev(s))

Fixed submission:
import math
while True:
	n = int(input())
	if n==0: break
	s = list(map(float, input().split()))
	t = sum(s)
	a = t / n
	b = sum(map(lambda x: (x-a)**2, s))
	print(math.sqrt(b/n))

Buggy python submission (verdict: Runtime Error):
import statistics
while 0!=int(input()):
	s = list(map(int, input().split()))
	print(stdev(s))

Fixed submission:
import math
while True:
	n = int(input())
	if n==0: break
	s = list(map(float, input().split()))
	t = sum(s)
	a = t / n
	b = sum(map(lambda x: (x-a)**2, s))
	print(math.sqrt(b/n))

Buggy python submission (verdict: Runtime Error):
import math
while True:
	n = int(input())
	if n==0: break
	s = list(map(float, raw_input().split()))
	t = sum(s)
	a = t / n
	b = sum(map(lambda x: (x-a)**2, s))
	print(math.sqrt(b/n))

Fixed submission:
import math
while True:
	n = int(input())
	if n==0: break
	s = list(map(float, input().split()))
	t = sum(s)
	a = t / n
	b = sum(map(lambda x: (x-a)**2, s))
	print(math.sqrt(b/n))
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
x = list(map(int, raw_input().split()))
y = list(map(int, raw_input().split()))
t1 = t2 = t3 = ti = 0.0
for a, b in zip(x, y):
	d1 = abs(a - b)
	ti = max(ti, d1)
	t1 += d1
	t2 += d1**2
	t3 += d1**3
print(t1)
print(math.sqrt(t2))
print(t3 ** (1.0/3))
print(ti)

Fixed submission:

import math
n = int(input())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
t1 = t2 = t3 = ti = 0.0
for a, b in zip(x, y):
	d1 = abs(a - b)
	ti = max(ti, d1)
	t1 += d1
	t2 += d1**2
	t3 += d1**3
print(t1)
print(math.sqrt(t2))
print(t3 ** (1.0/3))
print(ti)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
# ?????????????????¨????????????
class Dice(object):
	def __init__(self):
		# ???????????????????????°
		# ????????¶???
		self.x = [2, 5]
		self.y = [3, 4]
		self.z = [1, 6]
		SN = {'S': 0, 'N': 1}
		WE = {'W': 0, 'E': 1}
		pass

	def rotate(self, _dir):
		def rot(_k, _r):
			return list(reversed(_r)), _k

		if _dir=='N':
			self.x, self.z = rot(self.x, self.z)
		elif _dir=='S':
			self.z, self.x = rot(self.z, self.x)
		elif _dir=='E':
			self.z, self.y = rot(self.z, self.y)
		elif _dir=='W':
			self.y, self.z = rot(self.y, self.z)
		else:
			pass

	def top(self):
		return self.z[0]

	def view(self):
		print("x, y, z =", self.x, self.y, self.z)

if __name__=="__main__":
	val = list(map(int, input().split()))
	dice = Dice()
	dr = input()
	for d in dr:
		dice.rotate(d)
	print(val(dice.top()))

Fixed submission:
# coding: utf-8
# ?????????????????¨????????????
class Dice(object):
	def __init__(self):
		# ???????????????????????°
		# ????????¶???
		self.x = [2, 5]
		self.y = [3, 4]
		self.z = [1, 6]
		SN = {'S': 0, 'N': 1}
		WE = {'W': 0, 'E': 1}
		pass

	def rotate(self, _dir):
		def rot(_k, _r):
			return list(reversed(_r)), _k

		if _dir=='N':
			self.x, self.z = rot(self.x, self.z)
		elif _dir=='S':
			self.z, self.x = rot(self.z, self.x)
		elif _dir=='E':
			self.z, self.y = rot(self.z, self.y)
		elif _dir=='W':
			self.y, self.z = rot(self.y, self.z)
		else:
			pass

	def top(self):
		return self.z[0]


if __name__=="__main__":
	dice = Dice()
	val = list(map(int, input().split()))
	dr = input()
	for d in dr:
		dice.rotate(d)
	print(val[dice.top()-1])
Buggy python submission (verdict: Runtime Error):
line = raw_input()
a = line.split(" ")
s = a[0] * a[1]
len = 2 * s
print str(s) + " " + str(len)

Fixed submission:
line = raw_input()
lis = line.split()
a = int(lis[0])
b = int(lis[1])
s = a * b
len = 2 * (a + b)
print str(s) + " " + str(len)

Buggy python submission (verdict: Runtime Error):
line = raw_input()
a = line.split(" ")
s = a[0] * a[1]
len = 2 * (a[0] + a[1])
print str(s) + " " + str(len)

Fixed submission:
line = raw_input()
lis = line.split()
a = int(lis[0])
b = int(lis[1])
s = a * b
len = 2 * (a + b)
print str(s) + " " + str(len)

Buggy python submission (verdict: Runtime Error):
line = raw_input()
a = line.split()
s = a[0] * a[1]
len = 2 * (a[0] + a[1])
print str(s) + " " + str(len)

Fixed submission:
line = raw_input()
lis = line.split()
a = int(lis[0])
b = int(lis[1])
s = a * b
len = 2 * (a + b)
print str(s) + " " + str(len)
Buggy python submission (verdict: Runtime Error):
t = raw_input()
s = t.split()
if s[0] == s[1]:
	print "a == b"
else:
	if int(s[0]) > int(s[1])
		print "a > b"
	else:
		print "a < b"

Fixed submission:
t = raw_input()
s = t.split()
if s[0] == s[1]:
	print "a == b"
else:
	if int(s[0]) > int(s[1]):
		print "a > b"
	else:
		print "a < b"
Buggy python submission (verdict: Runtime Error):
i = map(int, raw_input().split()).sort()
for x in i:
	print x,
print ""

Fixed submission:
s = map(int, raw_input().split())
s.sort()
print ' '.join(map(str, s))
Buggy python submission (verdict: Runtime Error):
w, h, x, y, r = map(int, raw_input().split())
if x>=r and y>=r and x+r<=w an y+r<=h:
	print "Yes"
else:
	print "No"

Fixed submission:
w, h, x, y, r = map(int, raw_input().split())
if x>=r and y>=r and x+r<=w and y+r<=h:
	print "Yes"
else:
	print "No"