Buggy python submission (verdict: Runtime Error):
class Dice:

u,s,e,w,n,b = map(int,input().split())
roll = input()
for i in range(len(data)):
	if roll[i] == E:
		tmp = e
		e = u
		u = w
		w = b
		b = tmp
	elif roll[i] == S:
		tmp = s
		s = u
		u = n
		n = b
		b = tmp
	elif roll[i] == W:
		tmp = w
		w = u
		u = e
		e = b
		b = tmp
	elif roll[i] == N:
		tmp = n
		n = u
		u = s
		s = b
		b = tmp

print(u)

Fixed submission:
class Dice:
    u, s, e, w, n, b = map(int, input().split())
    roll = input()
    for i in roll:
        if i == "E":
            e,u,w,b = u,w,b,e
        elif i == "S":
            s,u,n,b = u,n,b,s
        elif i == "W":
            w,u,e,b = u,e,b,w
        elif i == "N":
            n,u,s,b = u,s,b,n
    print(u)

dice = Dice()

Buggy python submission (verdict: Runtime Error):
class Dice:

u,s,e,w,n,b = map(int,input().split())
roll = input()
for i in range(len(roll)):
	if roll[i] == E:
		tmp = e
		e = u
		u = w
		w = b
		b = tmp
	elif roll[i] == S:
		tmp = s
		s = u
		u = n
		n = b
		b = tmp
	elif roll[i] == W:
		tmp = w
		w = u
		u = e
		e = b
		b = tmp
	elif roll[i] == N:
		tmp = n
		n = u
		u = s
		s = b
		b = tmp

print(u)

Fixed submission:
class Dice:
    u, s, e, w, n, b = map(int, input().split())
    roll = input()
    for i in roll:
        if i == "E":
            e,u,w,b = u,w,b,e
        elif i == "S":
            s,u,n,b = u,n,b,s
        elif i == "W":
            w,u,e,b = u,e,b,w
        elif i == "N":
            n,u,s,b = u,s,b,n
    print(u)

dice = Dice()

Buggy python submission (verdict: Runtime Error):
class Dice:

u,s,e,w,n,b = map(int,input().split())
roll = input()
for i in range(len(roll)):
	if roll[i] == E:
		tmp = e
		e = u
		u = w
		w = b
		b = tmp
	elif roll[i] == S:
		tmp = s
		s = u
		u = n
		n = b
		b = tmp
	elif roll[i] == W:
		tmp = w
		w = u
		u = e
		e = b
		b = tmp
	elif roll[i] == N:
		tmp = n
		n = u
		u = s
		s = b
		b = tmp

print(u)

Fixed submission:
class Dice:
    u, s, e, w, n, b = map(int, input().split())
    roll = input()
    for i in roll:
        if i == "E":
            e,u,w,b = u,w,b,e
        elif i == "S":
            s,u,n,b = u,n,b,s
        elif i == "W":
            w,u,e,b = u,e,b,w
        elif i == "N":
            n,u,s,b = u,s,b,n
    print(u)

dice = Dice()

Buggy python submission (verdict: Runtime Error):
class Dice:

u,s,e,w,n,b = map(int,input().split())
roll = input()
for i in roll:
	if roll[i] == E:
		tmp = e
		e = u
		u = w
		w = b
		b = tmp
	elif roll[i] == S:
		tmp = s
		s = u
		u = n
		n = b
		b = tmp
	elif roll[i] == W:
		tmp = w
		w = u
		u = e
		e = b
		b = tmp
	elif roll[i] == N:
		tmp = n
		n = u
		u = s
		s = b
		b = tmp

print(u)

Fixed submission:
class Dice:
    u, s, e, w, n, b = map(int, input().split())
    roll = input()
    for i in roll:
        if i == "E":
            e,u,w,b = u,w,b,e
        elif i == "S":
            s,u,n,b = u,n,b,s
        elif i == "W":
            w,u,e,b = u,e,b,w
        elif i == "N":
            n,u,s,b = u,s,b,n
    print(u)

dice = Dice()

Buggy python submission (verdict: Runtime Error):
class Dice:

u,s,e,w,n,b = map(int,input().split())
roll = input()
for i in roll:
	if i == E:
		tmp = e
		e = u
		u = w
		w = b
		b = tmp
	elif i == S:
		tmp = s
		s = u
		u = n
		n = b
		b = tmp
	elif i == W:
		tmp = w
		w = u
		u = e
		e = b
		b = tmp
	elif i == N:
		tmp = n
		n = u
		u = s
		s = b
		b = tmp

print(u)

Fixed submission:
class Dice:
    u, s, e, w, n, b = map(int, input().split())
    roll = input()
    for i in roll:
        if i == "E":
            e,u,w,b = u,w,b,e
        elif i == "S":
            s,u,n,b = u,n,b,s
        elif i == "W":
            w,u,e,b = u,e,b,w
        elif i == "N":
            n,u,s,b = u,s,b,n
    print(u)

dice = Dice()