A and B are preparing themselves for programming contests.

To train their logical thinking and solve problems better, A and B decided to play chess. During the game A wondered whose position is now stronger.

For each chess piece we know its weight:   the queen's weight is 9,  the rook's weight is 5,  the bishop's weight is 3,  the knight's weight is 3,  the pawn's weight is 1,  the king's weight isn't considered in evaluating position. 

The player's weight equals to the sum of weights of all his pieces on the board.

As A doesn't like counting, he asked you to help him determine which player has the larger position weight.


-----Input-----

The input contains eight lines, eight characters each — the board's description.

The white pieces on the board are marked with uppercase letters, the black pieces are marked with lowercase letters.

The white pieces are denoted as follows: the queen is represented is 'Q', the rook — as 'R', the bishop — as'B', the knight — as 'N', the pawn — as 'P', the king — as 'K'.

The black pieces are denoted as 'q', 'r', 'b', 'n', 'p', 'k', respectively.

An empty square of the board is marked as '.' (a dot). 

It is not guaranteed that the given chess position can be achieved in a real game. Specifically, there can be an arbitrary (possibly zero) number pieces of each type, the king may be under attack and so on.


-----Output-----

Print "White" (without quotes) if the weight of the position of the white pieces is more than the weight of the position of the black pieces, print "Black" if the weight of the black pieces is more than the weight of the white pieces and print "Draw" if the weights of the white and black pieces are equal.


-----Examples-----
Input
...QK...
........
........
........
........
........
........
...rk...

Output
White

Input
rnbqkbnr
pppppppp
........
........
........
........
PPPPPPPP
RNBQKBNR

Output
Draw

Input
rppppppr
...k....
........
........
........
........
K...Q...
........

Output
Black



-----Note-----

In the first test sample the weight of the position of the white pieces equals to 9, the weight of the position of the black pieces equals 5.

In the second test sample the weights of the positions of the black and the white pieces are equal to 39.

In the third test sample the weight of the position of the white pieces equals to 9, the weight of the position of the black pieces equals to 16.

Difficulty: EASY
Tags: Implementation

Starter code:

Solutions:
a = list()
i = int()
j = int()
White = 0
Black = 0
for i in range(0, 8):
	a = input()
	for j in range(0, 8):
		if a[j] == 'Q':
			White += 9
		if a[j] == 'R':
			White += 5
		if a[j] == 'B':
			White += 3
		if a[j] == 'N':
			White += 3
		if a[j] == 'P':
			White += 1
		if a[j] == 'q':
			Black += 9
		if a[j] == 'r':
			Black += 5
		if a[j] == 'b':
			Black += 3
		if a[j] == 'n':
			Black += 3
		if a[j] == 'p':
			Black += 1
if Black > White:
	print('Black')
if White > Black:
	print('White')
if White == Black:
	print('Draw')


figs = {}
for i in range(8):
	s = input()
	for j in s:
		if j != '.':
			if j not in figs:
				figs[j] = 1
			else:
				figs[j] += 1
white = 0
black = 0
for i in figs:
	if i == 'q':
		black += figs[i] * 9
	elif i == 'r':
		black += figs[i] * 5
	elif i == 'b' or i == 'n':
		black += figs[i] * 3
	elif i == 'p':
		black += figs[i]
	if i == 'Q':
		white += figs[i] * 9
	elif i == 'R':
		white += figs[i] * 5
	elif i == 'B' or i == 'N':
		white += figs[i] * 3
	elif i == 'P':
		white += figs[i]
if black > white:
	print('Black')
elif white > black:
	print('White')
else:
	print('Draw')


wwght = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
bwght = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
white = black = 0
for i in range(8):
	s = input()
	for i in s:
		if i in wwght:
			white += wwght[i]
		elif i in bwght:
			black += bwght[i]
if white == black:
	print('Draw')
elif white > black:
	print('White')
else:
	print('Black')


ans = 0
for i in range(8):
	v = input()
	while v == '':
		v = input()
	for j in v:
		if j == 'Q':
			ans = ans + 9
		if j == 'q':
			ans = ans - 9
		if j == 'R':
			ans = ans + 5
		if j == 'r':
			ans = ans - 5
		if j == 'B' or j == 'N':
			ans = ans + 3
		if j == 'b' or j == 'n':
			ans = ans - 3
		if j == 'P':
			ans = ans + 1
		if j == 'p':
			ans = ans - 1
if ans > 0:
	print('White')
if ans < 0:
	print('Black')
if ans == 0:
	print('Draw')


WHITE = 0
black = 0
for i in range(8):
	line = input()
	for elem in line:
		if elem == 'Q':
			WHITE += 9
		elif elem == 'R':
			WHITE += 5
		elif elem == 'B' or elem == 'N':
			WHITE += 3
		elif elem == 'P':
			WHITE += 1
		elif elem == 'q':
			black += 9
		elif elem == 'r':
			black += 5
		elif elem == 'b' or elem == 'n':
			black += 3
		elif elem == 'p':
			black += 1
if WHITE > black:
	print('White')
elif black > WHITE:
	print('Black')
else:
	print('Draw')


w = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
b = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
ws = 0
bs = 0
for i in range(8):
	s = input()
	for x in s:
		if x > 'A' and x < 'Z':
			ws += w[x]
		elif x > 'a' and x < 'z':
			bs += b[x]
if bs == ws:
	print('Draw')
elif bs > ws:
	print('Black')
else:
	print('White')


white = 0
black = 0
for i in range(8):
	st = input()
	for j in range(8):
		if st[j] in 'QRBNP':
			if st[j] == 'Q':
				white += 9
			elif st[j] == 'R':
				white += 5
			elif st[j] == 'B' or st[j] == 'N':
				white += 3
			elif st[j] == 'P':
				white += 1
		if st[j] in 'qrbnp':
			if st[j] == 'q':
				black += 9
			elif st[j] == 'r':
				black += 5
			elif st[j] == 'b' or st[j] == 'n':
				black += 3
			elif st[j] == 'p':
				black += 1
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


board = ''
blackvalues = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
whitevalues = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
for i in range(8):
	board += input()
blackweight = 0
whiteweight = 0
for i in board:
	if i in blackvalues:
		blackweight += blackvalues[i]
	elif i in whitevalues:
		whiteweight += whitevalues[i]
if blackweight == whiteweight:
	print('Draw')
elif blackweight > whiteweight:
	print('Black')
elif blackweight < whiteweight:
	print('White')


u = 0
v = 0

def f(c):
	global u
	global v
	if c == 'Q':
		u += 9
	elif c == 'R':
		u += 5
	elif c == 'B':
		u += 3
	elif c == 'N':
		u += 3
	elif c == 'P':
		u += 1
	elif c == 'q':
		v += 9
	elif c == 'r':
		v += 5
	elif c == 'b':
		v += 3
	elif c == 'n':
		v += 3
	elif c == 'p':
		v += 1
for i in range(8):
	for c in input():
		f(c)
if u == v:
	print('Draw')
elif u > v:
	print('White')
else:
	print('Black')


s = ''
for i in range(8):
	s += input()
b = 0
w = 0
for e in s:
	if e != '.':
		if e == 'p':
			b += 1
		if e == 'P':
			w += 1
		elif e == 'b' or e == 'n':
			b += 3
		elif e == 'B' or e == 'N':
			w += 3
		elif e == 'r':
			b += 5
		elif e == 'R':
			w += 5
		elif e == 'q':
			b += 9
		elif e == 'Q':
			w += 9
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


__author__ = 'Krishna'
values = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
whiteStrength = 0
blackStrength = 0
for i in range(8):
	for piece in input():
		if ord('a') <= ord(piece) <= ord('z'):
			blackStrength += values.get(piece)
		elif ord('A') <= ord(piece) <= ord('Z'):
			whiteStrength += values.get(piece.lower())
if whiteStrength > blackStrength:
	print('White')
elif whiteStrength == blackStrength:
	print('Draw')
else:
	print('Black')


A = [''] * 8
b = 0
w = 0

def count(v):
	nonlocal w, b
	if v == 'Q':
		w += 9
	elif v == 'R':
		w += 5
	elif v == 'B':
		w += 3
	elif v == 'N':
		w += 3
	elif v == 'P':
		w += 1
	elif v == 'q':
		b += 9
	elif v == 'r':
		b += 5
	elif v == 'b':
		b += 3
	elif v == 'n':
		b += 3
	elif v == 'p':
		b += 1
for i in range(8):
	A[i] = input()
	for j in range(8):
		count(A[i][j])
if b > w:
	print('Black')
elif b == w:
	print('Draw')
else:
	print('White')


(w, b) = (0, 0)
points = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
for _ in range(8):
	i = input().replace('.', '')
	for l in set(i):
		if l.islower():
			b += i.count(l) * points[l]
		else:
			w += i.count(l) * points[l.lower()]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


i = 0
l = ''
while i < 8:
	l += input()
	i += 1
w = l.count('Q') * 9 + l.count('R') * 5 + l.count('B') * 3 + l.count('N') * 3 + l.count('P')
b = l.count('q') * 9 + l.count('r') * 5 + l.count('b') * 3 + l.count('n') * 3 + l.count('p')
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


d = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
w = b = 0
for _ in range(8):
	for c in input():
		if c in d:
			w += d[c]
		else:
			t = str(chr(ord(c) - 32))
			if t in d:
				b += d[t]
print(['Black', 'White'][w > b] if w != b else 'Draw')


x = 8
a = 0
b = 0
for i in range(x):
	y = input()
	for j in range(x):
		if y[j].islower():
			if y[j] == 'p':
				b += 1
			elif y[j] == 'n' or y[j] == 'b':
				b += 3
			elif y[j] == 'r':
				b += 5
			elif y[j] == 'q':
				b += 9
		elif y[j].isupper():
			if y[j] == 'P':
				a += 1
			elif y[j] == 'N' or y[j] == 'B':
				a += 3
			elif y[j] == 'R':
				a += 5
			elif y[j] == 'Q':
				a += 9
if a > b:
	print('White')
elif a < b:
	print('Black')
else:
	print('Draw')


weight1 = 0
weight2 = 0
for a in range(8):
	lst = input()
	for i in lst:
		if i == 'Q':
			weight1 += 9
		elif i == 'q':
			weight2 += 9
		elif i == 'R':
			weight1 += 5
		elif i == 'r':
			weight2 += 5
		elif i == 'B':
			weight1 += 3
		elif i == 'b':
			weight2 += 3
		elif i == 'N':
			weight1 += 3
		elif i == 'n':
			weight2 += 3
		elif i == 'P':
			weight1 += 1
		elif i == 'p':
			weight2 += 1
if weight1 > weight2:
	print('White')
elif weight1 < weight2:
	print('Black')
else:
	print('Draw')


count_w = 0
count_b = 0
info = {'q': 9, 'Q': 9, 'r': 5, 'R': 5, 'b': 3, 'B': 3, 'n': 3, 'N': 3, 'p': 1, 'P': 1, 'k': 0, 'K': 0}
for i in range(0, 8):
	data = input().replace('.', '')
	for j in data:
		if j in info:
			if j.isupper():
				count_w += info[j]
			else:
				count_b += info[j]
if count_w > count_b:
	print('White')
elif count_w < count_b:
	print('Black')
else:
	print('Draw')


WW = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
WB = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, '.': 0}
W = 0
B = 0
for i in range(8):
	s = input()
	for j in range(len(s)):
		if s[j] in WW:
			W += WW[s[j]]
		elif s[j] in WB:
			B += WB[s[j]]
if W > B:
	print('White')
elif W == B:
	print('Draw')
else:
	print('Black')


board = []
for _ in range(8):
	board.append(list(input()))
board = sum(board, [])
white = board.count('Q') * 9 + board.count('R') * 5 + board.count('B') * 3 + board.count('N') * 3 + board.count('P')
black = board.count('q') * 9 + board.count('r') * 5 + board.count('b') * 3 + board.count('n') * 3 + board.count('p')
print('White' if white > black else 'Black' if white < black else 'Draw')


is_debug = False
w = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
a = b = 0
for _ in range(8):
	for c in input():
		if c.islower():
			b += w[c]
		else:
			a += w[c.lower()]
if a == b:
	print('Draw')
else:
	print(f"{('White' if a > b else 'Black')}")


import sys
R = lambda : map(int, input().split())
score = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, 'Q': -9, 'R': -5, 'B': -3, 'N': -3, 'P': -1, 'K': 0, '.': 0}
sum = 0
for _ in range(8):
	for c in input():
		sum += score[c]
if sum == 0:
	print('Draw')
elif sum > 0:
	print('Black')
else:
	print('White')


x = 0
y = 0
a = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
b = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
for u in range(8):
	l = input().strip()
	for i in l:
		if i in a:
			x = x + a[i]
		elif i in b:
			y = y + b[i]
if x > y:
	print('White')
elif y > x:
	print('Black')
else:
	print('Draw')


b = 0
c = 0
for _ in range(8):
	a = input()
	for i in range(8):
		if a[i] == 'Q':
			b = b + 9
		elif a[i] == 'q':
			c = c + 9
		elif a[i] == 'R':
			b = b + 5
		elif a[i] == 'r':
			c = c + 5
		elif a[i] == 'B' or a[i] == 'N':
			b = b + 3
		elif a[i] == 'b' or a[i] == 'n':
			c = c + 3
		elif a[i] == 'P':
			b = b + 1
		elif a[i] == 'p':
			c = c + 1
if b == c:
	print('Draw')
elif b > c:
	print('White')
else:
	print('Black')


def count(let):
	k = 0
	if let == 'q':
		k = 9
	elif let == 'r':
		k = 5
	elif let == 'b':
		k = 3
	elif let == 'n':
		k = 3
	elif let == 'p':
		k = 1
	else:
		k = 0
	return k

def main():
	x = 0
	y = 0
	for i in range(8):
		a = input().strip().split()
		for j in a[0]:
			if j != '.':
				if j > 'Z':
					x += count(j)
				else:
					y += count(j.lower())
	if x > y:
		print('Black')
	elif x < y:
		print('White')
	else:
		print('Draw')
main()


def a_and_b_and_chess(a):
	t = [a[h] for h in range(len(a)) if a[h] != '.']
	pw = ['Q', 'R', 'B', 'N', 'P', 'K']
	pb = ['q', 'r', 'b', 'n', 'p', 'k']
	values = [9, 5, 3, 3, 1, 0]
	w = dict(zip(pw, values))
	b = dict(zip(pb, values))
	w_sum = 0
	b_sum = 0
	for i in t:
		if i.isupper():
			w_sum += w[i]
		else:
			b_sum += b[i]
	if w_sum > b_sum:
		return 'White'
	elif w_sum < b_sum:
		return 'Black'
	else:
		return 'Draw'
s = ''
for i in range(8):
	s += input()
print(a_and_b_and_chess(s))


white = {'Q': 9, 'R': 5, 'B': 3, 'P': 1, 'N': 3, 'K': 0}
black = {'q': 9, 'r': 5, 'b': 3, 'p': 1, 'n': 3, 'k': 0}
board = []
whiteval = 0
blackval = 0
for x in range(8):
	word = list(input())
	board.append(word)
for x in board:
	for i in x:
		if i in white:
			whiteval += white[i]
		elif i in black:
			blackval += black[i]
		else:
			continue
if whiteval > blackval:
	print('White')
elif blackval > whiteval:
	print('Black')
else:
	print('Draw')


values = {'Q': 9, 'q': -9, 'K': 0, 'k': 0, 'R': 5, 'r': -5, 'B': 3, 'b': -3, 'N': 3, 'n': -3, 'P': 1, 'p': -1, '.': 0}

def evaluate_row(row, acc):
	return acc if not row else evaluate_row(row[1:], acc + [values[row[0]]])

def evaluate_configuration(configuration, acc):
	return acc if not configuration else evaluate_configuration(configuration[1:], acc + evaluate_row(configuration[0], []))

def main():
	configuration = [input() for _ in range(0, 8)]
	acc = evaluate_configuration(configuration, [])
	print('Black' if sum(acc) < 0 else 'White' if sum(acc) > 0 else 'Draw')
main()


I = 'QRBNPK'
a = dict(zip(I + I.lower() + '.', [9, 5, 3, 3, 1, 0, -9, -5, -3, -3, -1, 0, 0]))
r = sum((a[x] for _ in range(8) for x in input()))
print('Draw' if r == 0 else ['White', 'Black'][r < 0])


scores = {'Q': 9, 'q': -9, 'R': 5, 'r': -5, 'B': 3, 'b': -3, 'N': 3, 'n': -3, 'P': 1, 'p': -1, '.': 0, 'K': 0, 'k': 0}
white = 0
for i in range(8):
	line = input()
	for c in line:
		white += scores[c]
if white > 0:
	print('White')
elif white == 0:
	print('Draw')
else:
	print('Black')


pieces_point = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(white, black) = (0, 0)
for _ in range(8):
	line = str(input())
	for piece in line:
		if piece == '.':
			continue
		if piece.isupper():
			white += pieces_point.get(piece.lower())
		else:
			black += pieces_point.get(piece)
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


val_w = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
val_b = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
sum_w = 0
sum_b = 0
for i in range(8):
	s = [j for j in input() if j != '.']
	for ch in s:
		if ch in val_w.keys():
			sum_w += val_w[ch]
		else:
			sum_b += val_b[ch]
if sum_w > sum_b:
	print('White')
elif sum_w == sum_b:
	print('Draw')
else:
	print('Black')


import sys
import math
w = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
a = 0
b = 0
for _ in range(8):
	s = input()
	for c in s:
		if c.islower():
			a += w[c.upper()]
		if c.isupper():
			b += w[c]
if a < b:
	print('White')
elif a > b:
	print('Black')
else:
	print('Draw')


s = str()
m = 0
k = 0
for j in range(8):
	a = str(input())
	for i in range(len(a)):
		if a[i] != '.':
			s = s + str(a[i])
s = sorted(s)
qw = s.count('Q')
rw = s.count('R')
bw = s.count('B')
nw = s.count('N')
pw = s.count('P')
qb = s.count('q')
rb = s.count('r')
bb = s.count('b')
nb = s.count('n')
pb = s.count('p')
w = qw * 9 + rw * 5 + bw * 3 + nw * 3 + pw * 1
b = qb * 9 + rb * 5 + bb * 3 + nb * 3 + pb * 1
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


costs = dict(Q=9, R=5, B=3, N=3, P=1, K=0, q=-9, r=-5, b=-3, n=-3, p=-1, k=0)
costs['.'] = 0
res = 0
for i in range(8):
	for c in input():
		res += costs[c]
print('Draw' if res == 0 else 'White' if res > 0 else 'Black')


sw = 0
sb = 0
for i in range(0, 8):
	a = str(input().strip())
	for i in a:
		if i == 'Q':
			sw = sw + 9
		elif i == 'R':
			sw = sw + 5
		elif i == 'B':
			sw = sw + 3
		elif i == 'N':
			sw = sw + 3
		elif i == 'P':
			sw = sw + 1
		if i == 'q':
			sb = sb + 9
		elif i == 'r':
			sb = sb + 5
		elif i == 'b':
			sb = sb + 3
		elif i == 'n':
			sb = sb + 3
		elif i == 'p':
			sb = sb + 1
if sw > sb:
	print('White')
elif sb > sw:
	print('Black')
else:
	print('Draw')


from sys import *
MAXN = 10 ** 5 + 228
MOD = 10 ** 9 + 7

def tosumupW(board):
	d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
	res = 0
	for i in board:
		res += d.get(i, 0)
	return res

def tosumupB(board):
	d = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
	res = 0
	for i in board:
		res += d.get(i, 0)
	return res
board = ''
for i in range(8):
	board += input()
if tosumupW(board) < tosumupB(board):
	print('White')
elif tosumupW(board) == tosumupB(board):
	print('Draw')
else:
	print('Black')


n = 8
bl = 0
wh = 0
t = []
while n > 0:
	l = list(input())
	t.append(l)
	n = n - 1
d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
for i in range(8):
	for j in range(8):
		if t[i][j] in {'q', 'r', 'b', 'n', 'p', 'k'}:
			bl = bl + d[t[i][j]]
		elif t[i][j] in {'Q', 'R', 'B', 'N', 'P', 'K'}:
			wh = wh + d[t[i][j]]
		else:
			continue
if bl > wh:
	print('Black')
if bl < wh:
	print('White')
if bl == wh:
	print('Draw')


w = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
white = 0
black = 0
for k in range(8):
	i = input()
	for j in i:
		if j in w:
			white = white + w[j]
		else:
			black = black + w[chr(ord(j) + 32)]
if white < black:
	print('White')
elif black < white:
	print('Black')
else:
	print('Draw')


d = {'Q': 9, 'q': 9, 'R': 5, 'r': 5, 'B': 3, 'b': 3, 'N': 3, 'n': 3, 'P': 1, 'p': 1, 'K': 0, 'k': 0}
a = b = 0
for _ in [0] * 8:
	for i in input():
		if i >= 'A' and i <= 'Z':
			a += d[i]
		elif i >= 'a' and i <= 'z':
			b += d[i]
if a > b:
	print('White')
elif a < b:
	print('Black')
else:
	print('Draw')


a = {'Q': 9, 'R': 5, 'P': 1, 'B': 3, 'N': 3}
s1 = 0
s2 = 0
for i in range(8):
	b = input().replace('.', '')
	for j in b:
		if j.isupper():
			s1 += a.get(j, 0)
		else:
			s2 += a.get(j.upper(), 0)
if s1 > s2:
	print('White')
elif s1 == s2:
	print('Draw')
else:
	print('Black')


(wt, bt) = (0, 0)
for _ in range(8):
	line = input()
	wt += line.count('Q') * 9 + line.count('R') * 5 + line.count('B') * 3 + line.count('N') * 3 + line.count('P')
	bt += line.count('q') * 9 + line.count('r') * 5 + line.count('b') * 3 + line.count('n') * 3 + line.count('p')
if wt > bt:
	print('White')
elif wt < bt:
	print('Black')
else:
	print('Draw')


weights = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'k': 0, '.': 0}
whites = 0
blacks = 0
board = []
for i in range(8):
	row = input()
	for piece in row:
		if piece.isupper():
			whites += weights[piece]
		else:
			blacks += weights[piece]
if whites > blacks:
	print('White')
elif blacks > whites:
	print('Black')
else:
	print('Draw')


q = 9
r = 5
b = 3
n = 3
p = 1
a = list(input())
a = a + list(input())
a = a + list(input())
a = a + list(input())
a = a + list(input())
a = a + list(input())
a = a + list(input())
a = a + list(input())
anse1 = 0
anse2 = 0
for i in range(len(a)):
	if a[i].isupper() and a[i] != '.':
		if a[i] == 'Q':
			anse1 = anse1 + q
		elif a[i] == 'R':
			anse1 = anse1 + r
		elif a[i] == 'B':
			anse1 = anse1 + b
		elif a[i] == 'N':
			anse1 = anse1 + n
		elif a[i] == 'P':
			anse1 = anse1 + p
	elif a[i].islower() and a[i] != '.':
		if a[i] == 'q':
			anse2 = anse2 + q
		elif a[i] == 'r':
			anse2 = anse2 + r
		elif a[i] == 'b':
			anse2 = anse2 + b
		elif a[i] == 'n':
			anse2 = anse2 + n
		elif a[i] == 'p':
			anse2 = anse2 + p
if anse1 > anse2:
	print('White')
elif anse1 < anse2:
	print('Black')
else:
	print('Draw')


li = ''
for i in range(8):
	li += input()
q = 'q'
r = 'r'
b = 'b'
n = 'n'
p = 'p'
Q = 'Q'
R = 'R'
B = 'B'
N = 'N'
P = 'P'
black = li.count(q) * 9
black += li.count(r) * 5
black += li.count(b) * 3
black += li.count(n) * 3
black += li.count(p)
white = li.count(Q) * 9 + li.count(R) * 5 + li.count(B) * 3 + li.count(N) * 3 + li.count(P)
if black > white:
	print('Black')
elif white > black:
	print('White')
else:
	print('Draw')


from enum import Enum

class chess(Enum):
	q = 9
	r = 5
	b = 3
	n = 3
	p = 1
	k = 0
	Q = 9
	R = 5
	B = 3
	N = 3
	P = 1
	K = 0
b = 0
w = 0
for _ in range(8):
	a = list(input())
	for j in a:
		if j != '.':
			if j.islower():
				b += chess[j].value
			else:
				w += chess[j].value
if b == w:
	print('Draw')
elif b > w:
	print('Black')
else:
	print('White')


import math
import os
import sys
import re
import string
import itertools
import functools
import operator
mapping = {'.': +0, 'Q': +9, 'q': -9, 'R': +5, 'r': -5, 'B': +3, 'b': -3, 'N': +3, 'n': -3, 'P': +1, 'p': -1, 'K': +0, 'k': -0}
res = 0
for _ in range(8):
	for cell in input():
		res = res + mapping[cell]
if res > 0:
	print('White')
elif res < 0:
	print('Black')
else:
	print('Draw')


twod_list = []
white = 0
black = 0
for i in range(0, 8):
	twod_list.append(input())
for i in range(0, 8):
	for j in range(0, 8):
		if twod_list[i][j].isupper():
			if twod_list[i][j] == 'Q':
				white += 9
			elif twod_list[i][j] == 'R':
				white += 5
			elif twod_list[i][j] == 'B':
				white += 3
			elif twod_list[i][j] == 'N':
				white += 3
			elif twod_list[i][j] == 'P':
				white += 1
		elif twod_list[i][j].islower():
			if twod_list[i][j] == 'q':
				black += 9
			elif twod_list[i][j] == 'r':
				black += 5
			elif twod_list[i][j] == 'b':
				black += 3
			elif twod_list[i][j] == 'n':
				black += 3
			elif twod_list[i][j] == 'p':
				black += 1
if black > white:
	print('Black')
elif white > black:
	print('White')
elif white == black:
	print('Draw')


a = {}
a['q'] = 9
a['r'] = 5
a['b'] = 3
a['n'] = 3
a['p'] = 1
a['k'] = 0
black = 0
white = 0
for i in range(8):
	x = input()
	for i in x:
		if i == '.':
			continue
		if 'a' <= i <= 'z':
			black += a[i]
		else:
			white += a[i.lower()]
if black == white:
	print('Draw')
elif black > white:
	print('Black')
else:
	print('White')


count = 1
DataStr = list()
while count <= 8:
	data = list(input())
	DataStr += data
	count += 1
WTotal = 0
BTotal = 0

def Weight(x):
	if x == 'Q' or x == 'q':
		return 9
	elif x == 'R' or x == 'r':
		return 5
	elif x == 'B' or x == 'b':
		return 3
	elif x == 'N' or x == 'n':
		return 3
	elif x == 'P' or x == 'p':
		return 1
	else:
		return 0
for i in DataStr:
	if i == '.':
		continue
	elif i.isupper() == True:
		WTotal += Weight(i)
	else:
		BTotal += Weight(i)
if WTotal > BTotal:
	print('White')
elif BTotal > WTotal:
	print('Black')
else:
	print('Draw')


from math import *
from random import *
from copy import *
import os, sys
A = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0, '.': 0}
res = 0
for i in range(8):
	s = input()
	for j in s:
		res += A[j]
if res < 0:
	print('Black\n')
elif res == 0:
	print('Draw\n')
else:
	print('White\n')


black = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
white = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
weightW = []
weightB = []
wW = 0
wB = 0
lines = ''
for _ in range(8):
	line = input()
	line = line.replace('.', '')
	lines += line
for i in lines:
	if ord(i) > 96 and (not ord(i) == 107):
		weightB.append(i)
	elif not ord(i) == 75 and (not ord(i) == 107):
		weightW.append(i)
for i in weightB:
	wB += black[i]
for i in weightW:
	wW += white[i]
if wW > wB:
	print('White')
elif wW < wB:
	print('Black')
else:
	print('Draw')


figures = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, 'Q': -9, 'R': -5, 'B': -3, 'N': -3, 'P': -1, 'K': 0, '.': 0}
sum = 0
for i in range(8):
	string = str(input())
	for j in range(len(string)):
		sum += figures[string[j]]
if sum == 0:
	print('Draw')
elif sum > 0:
	print('Black')
elif sum < 0:
	print('White')


dct_w = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
dct_b = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
arr = []
for i in range(8):
	name = list(input())
	for k in range(8):
		arr.append(name[k])
count_w = 0
count_b = 0
for el in arr:
	if el in dct_w.keys():
		count_w += dct_w[el]
	elif el in dct_b.keys():
		count_b += dct_b[el]
if count_w > count_b:
	print('White')
elif count_w == count_b:
	print('Draw')
else:
	print('Black')


d = dict(zip('QRBNPKqrbnpk', [9, 5, 3, 3, 1, 0, -9, -5, -3, -3, -1, 0]))
n = 0
for _ in range(8):
	s = input()
	for c in s:
		if c.isalpha():
			n += d[c]
print(('Black', 'Draw', 'White')[(n >= 0) + (n > 0)])


lb = ['q', 'r', 'b', 'n', 'p', 'k']
lw = ['Q', 'R', 'B', 'N', 'P', 'K']
white = 0
black = 0
for i in range(8):
	l1 = input()
	for i in l1:
		if i != '.':
			if i in lb:
				if i == 'q':
					black += 9
				elif i == 'r':
					black += 5
				elif i == 'b':
					black += 3
				elif i == 'n':
					black += 3
				elif i == 'p':
					black += 1
			if i in lw:
				if i == 'Q':
					white += 9
				elif i == 'R':
					white += 5
				elif i == 'B':
					white += 3
				elif i == 'N':
					white += 3
				elif i == 'P':
					white += 1
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


d = {'q': 9, 'Q': 9, 'r': 5, 'R': 5, 'b': 3, 'B': 3, 'N': 3, 'n': 3, 'p': 1, 'P': 1}
(w, b) = (0, 0)
for i in range(8):
	l = input()
	for j in range(8):
		if l[j] in d:
			if l[j].islower():
				b += d.get(l[j])
			elif l[j].isupper():
				w += d.get(l[j])
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


dict = {'Q': 9, 'q': 9, 'R': 5, 'r': 5, 'B': 3, 'b': 3, 'N': 3, 'n': 3, 'P': 1, 'p': 1}
w = 0
b = 0
for i in range(8):
	row = input()
	for j in range(8):
		a = row[j]
		if a in ['Q', 'R', 'B', 'N', 'P']:
			w += dict[a]
		elif a in ['q', 'r', 'b', 'n', 'p']:
			b += dict[a]
if b > w:
	print('Black')
elif b == w:
	print('Draw')
else:
	print('White')


r1 = input()
r2 = input()
r3 = input()
r4 = input()
r5 = input()
r6 = input()
r7 = input()
r8 = input()
whitetotal = 0
blacktotal = 0

def yeet(x):
	global whitetotal, blacktotal
	f = 0
	while f < len(x):
		m = x[f]
		if m == 'Q' or m == 'K' or m == 'R' or (m == 'B') or (m == 'N') or (m == 'P') or (m == 'q') or (m == 'r') or (m == 'b') or (m == 'n') or (m == 'p') or (m == 'k') or (m == '.'):
			if m == '.':
				pass
			elif m == 'Q':
				whitetotal += 9
			elif m == 'R':
				whitetotal += 5
			elif m == 'B':
				whitetotal += 3
			elif m == 'N':
				whitetotal += 3
			elif m == 'P':
				whitetotal += 1
			elif m == 'K':
				pass
			elif m == 'q':
				blacktotal += 9
			elif m == 'r':
				blacktotal += 5
			elif m == 'b':
				blacktotal += 3
			elif m == 'n':
				blacktotal += 3
			elif m == 'p':
				blacktotal += 1
			elif m == 'k':
				pass
			else:
				return
		f += 1
if len(r1) == 8 and len(r2) == 8 and (len(r3) == 8) and (len(r4) == 8) and (len(r5) == 8) and (len(r6) == 8) and (len(r7) == 8) and (len(r8) == 8):
	yeet(r1)
	yeet(r2)
	yeet(r3)
	yeet(r4)
	yeet(r5)
	yeet(r6)
	yeet(r7)
	yeet(r8)
	if whitetotal > blacktotal:
		print('White')
	elif whitetotal < blacktotal:
		print('Black')
	else:
		print('Draw')


(W, B) = (0, 0)
for i in range(8):
	n = list(input())
	W = W + (n.count('Q') * 9 + n.count('B') * 3 + n.count('R') * 5 + n.count('N') * 3 + n.count('P') * 1)
	B = B + (n.count('q') * 9 + n.count('b') * 3 + n.count('r') * 5 + n.count('n') * 3 + n.count('p') * 1)
if W > B:
	print('White')
elif B > W:
	print('Black')
else:
	print('Draw')


white = ['Q', 'R', 'B', 'N', 'P', 'K']
black = ['q', 'r', 'b', 'n', 'p', 'k']
weigth = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
res_white = 0
res_black = 0
for i in range(8):
	line = input()
	for j in range(len(line)):
		if line[j] in white:
			res_white += weigth[line[j].lower()]
		elif line[j] in black:
			res_black += weigth[line[j].lower()]
if res_white > res_black:
	print('White')
elif res_white < res_black:
	print('Black')
else:
	print('Draw')


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
A = []
weights = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, '.': 0}
a = 0
b = 0
for i in range(8):
	row = input()
	for v in row:
		if v.islower():
			b += weights[v.upper()]
		else:
			a += weights[v]
if a > b:
	print('White')
elif a < b:
	print('Black')
else:
	print('Draw')


w = 0
b = 0
data1 = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, '.': 0}
data2 = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
for i in range(8):
	s = input()
	for f in s:
		if f in data1:
			w += data1[f]
		else:
			b += data2[f]
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


w = b = 0
m = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
for i in range(8):
	st = input()
	for c in st:
		if c.islower():
			b += m[c]
		elif c.isupper():
			w += m[c.lower()]
print('White' if w > b else 'Black' if b > w else 'Draw')


(a, b) = (0, 0)
mp1 = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
mp2 = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
for i in range(8):
	str = list(input())
	for j in range(8):
		if str[j] in mp1:
			a += mp1[str[j]]
		elif str[j] in mp2:
			b += mp2[str[j]]
print('Draw' if a == b else 'White' if b > a else 'Black')


X = []
weights = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'k': 0}
for i in range(8):
	x = input()
	X.append(x)
players = []
for i in range(8):
	for j in range(8):
		if X[i][j] != '.':
			players.append(X[i][j])
W = 0
B = 0
for i in range(len(players)):
	if players[i].isupper():
		W += weights[players[i]]
	if players[i].islower():
		B += weights[players[i]]
if W > B:
	print('White')
if B > W:
	print('Black')
if W == B:
	print('Draw')


q = [input() for _ in range(8)]
(m, n) = (0, 0)
for i in q:
	for j in range(8):
		if i[j] == 'Q':
			m = m + 9
		elif i[j] == 'R':
			m = m + 5
		elif i[j] == 'B':
			m = m + 3
		elif i[j] == 'N':
			m = m + 3
		elif i[j] == 'P':
			m = m + 1
		elif i[j] == 'q':
			n = n + 9
		elif i[j] == 'r':
			n = n + 5
		elif i[j] == 'b':
			n = n + 3
		elif i[j] == 'n':
			n = n + 3
		elif i[j] == 'p':
			n = n + 1
		else:
			continue
if n > m:
	print('Black')
elif n < m:
	print('White')
else:
	print('Draw')


scores = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
white = 0
black = 0
for i in range(8):
	line = list(input())
	for j in line:
		if j != '.' and (j in scores or j.upper() in scores):
			if j.islower():
				black += scores[j.upper()]
			else:
				white += scores[j]
if white > black:
	print('White')
elif white == black:
	print('Draw')
else:
	print('Black')


p = {'K': 0, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, '.': 0}
w = [0, 0]
for r in range(8):
	for ch in input():
		if ch != '.':
			w[ch.islower()] += p[ch.upper()]
if w[0] == w[1]:
	print('Draw')
else:
	print('White' if w[0] > w[1] else 'Black')


d = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
b = 0
w = 0
for i in range(8):
	s = input()
	for j in range(8):
		val = d[s[j]]
		if 65 <= ord(s[j]) <= 90:
			w = w + val
		elif 97 <= ord(s[j]) <= 122:
			b = b + val
if b > w:
	print('Black')
elif w > b:
	print('White')
else:
	print('Draw')


white = 0
black = 0
for i in range(8):
	row = input()
	for c in row:
		d = c.lower()
		if d == 'q':
			pts = 9
		elif d == 'r':
			pts = 5
		elif d in ['b', 'n']:
			pts = 3
		elif d == 'p':
			pts = 1
		else:
			pts = 0
		if c.islower():
			black += pts
		else:
			white += pts
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


r = []
white = 0
black = 0
for k in range(0, 8):
	l = list(input())
	r.append(l)
for i in range(0, 8):
	for j in range(0, 8):
		if r[i][j].isalpha() == True:
			if r[i][j].islower() == True:
				if r[i][j] == 'q':
					black = black + 9
				if r[i][j] == 'r':
					black = black + 5
				if r[i][j] == 'b' or r[i][j] == 'n':
					black = black + 3
				if r[i][j] == 'p':
					black = black + 1
			if r[i][j].isupper() == True:
				r[i][j] = r[i][j].lower()
				if r[i][j] == 'q':
					white = white + 9
				if r[i][j] == 'r':
					white = white + 5
				if r[i][j] == 'b' or r[i][j] == 'n':
					white = white + 3
				if r[i][j] == 'p':
					white = white + 1
if white > black:
	print('White')
if black > white:
	print('Black')
if black == white:
	print('Draw')


pieces = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
a_pieces = ['Q', 'R', 'B', 'N', 'P', 'K']
b_pieces = ['q', 'r', 'b', 'n', 'p', 'k']
a_score = 0
b_score = 0
for i in range(8):
	row = input()
	for piece in row:
		if piece != '.':
			if piece in a_pieces:
				a_score += pieces[piece.lower()]
			else:
				b_score += pieces[piece.lower()]
if a_score > b_score:
	print('White')
elif a_score < b_score:
	print('Black')
else:
	print('Draw')


my_map = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, '.': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0}
total = 0
for _ in range(8):
	s = list(input())
	for ch in s:
		total += my_map[ch]
if total == 0:
	print('Draw')
elif total > 0:
	print('White')
else:
	print('Black')


white = 0
black = 0
for _ in range(8):
	s = input().split()
	a = s[0]
	for i in range(len(a)):
		if a[i] == 'q':
			black += 9
		elif a[i] == 'r':
			black += 5
		elif a[i] == 'b' or a[i] == 'n':
			black += 3
		elif a[i] == 'p':
			black += 1
		elif a[i] == 'Q':
			white += 9
		elif a[i] == 'R':
			white += 5
		elif a[i] == 'B' or a[i] == 'N':
			white += 3
		elif a[i] == 'P':
			white += 1
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(a, b) = (0, 0)
for _ in range(8):
	for i in input():
		if i != '.':
			if i.isupper():
				a += d[i.lower()]
			else:
				b += d[i]
if a == b:
	print('Draw')
else:
	print('White' if a > b else 'Black')


whiteWeight = 0
blackWeight = 0
for i in range(0, 8):
	line = input()
	for j in range(0, len(line)):
		white = True
		score = 0
		if line[j] > 'a' and line[j] < 'z':
			white = False
		if line[j] == 'Q' or line[j] == 'q':
			score = 9
		elif line[j] == 'R' or line[j] == 'r':
			score = 5
		elif line[j] == 'B' or line[j] == 'b':
			score = 3
		elif line[j] == 'N' or line[j] == 'n':
			score = 3
		elif line[j] == 'P' or line[j] == 'p':
			score = 1
		if white:
			whiteWeight += score
		else:
			blackWeight += score
if whiteWeight > blackWeight:
	print('White')
elif blackWeight > whiteWeight:
	print('Black')
else:
	print('Draw')


ws = dict(list(zip('qrbnp', (9, 5, 3, 3, 1))))
white = black = 0
for ch in [ch for ch in str.join('', [input() for _ in range(8)]) if ch.lower() not in '.k']:
	if str.isupper(ch):
		white += ws[ch.lower()]
	else:
		black += ws[ch]
if black > white:
	print('Black')
elif black < white:
	print('White')
else:
	print('Draw')


def compare(count1, count2):
	if count1 > count2:
		return 'White'
	elif count2 > count1:
		return 'Black'
	return 'Draw'
white_pieces = ['Q', 'R', 'B', 'N', 'P', 'K']
black_pieces = ['q', 'r', 'b', 'n', 'p', 'k']
weights = [9, 5, 3, 3, 1, 0]
weight_pieces = {piece: weight for (piece, weight) in zip(black_pieces, weights)}
(black_count, white_count) = (0, 0)
for row in range(8):
	input_row = input().replace('.', '')
	for i in input_row:
		if i.islower():
			black_count += weight_pieces[i]
		else:
			white_count += weight_pieces[i.lower()]
result = compare(white_count, black_count)
print(result)


b = []
for i in range(8):
	s = input()
	b.append(s)
(p1, p2) = (0, 0)
for i in range(8):
	for j in range(8):
		if b[i][j] == 'Q':
			p1 += 9
		elif b[i][j] == 'R':
			p1 += 5
		elif b[i][j] == 'B':
			p1 += 3
		elif b[i][j] == 'N':
			p1 += 3
		elif b[i][j] == 'P':
			p1 += 1
		elif b[i][j] == 'q':
			p2 += 9
		elif b[i][j] == 'r':
			p2 += 5
		elif b[i][j] == 'b':
			p2 += 3
		elif b[i][j] == 'n':
			p2 += 3
		elif b[i][j] == 'p':
			p2 += 1
if p1 > p2:
	print('White')
elif p2 > p1:
	print('Black')
else:
	print('Draw')


import string
(wp, bp) = (0, 0)
for i in range(8):
	inStr = input()
	for p in list(inStr):
		if not p == '.':
			lp = p.lower()
			points = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}[lp]
			if not p.islower():
				wp = wp + points
			else:
				bp = bp + points
wp > bp and print('White') or (wp == bp and print('Draw')) or (wp < bp and print('Black'))


d = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, '.': 0}
(b, w) = (0, 0)
for i in range(8):
	s = input()
	for i in range(8):
		t = d[s[i].upper()]
		if s[i].isupper():
			w += t
		else:
			b += t
if b > w:
	print('Black')
elif w > b:
	print('White')
else:
	print('Draw')


pieces_vals = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0, '.': 0}
score = 0
for i in range(8):
	for ch in input():
		score += pieces_vals[ch]
if score > 0:
	print('White')
elif score < 0:
	print('Black')
else:
	print('Draw')


x = {'k': 0, '.': 0, 'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
counter = 0
for i in range(8):
	for j in input():
		if j.isupper():
			counter += x[j.lower()]
		else:
			counter -= x[j]
print(('Black', 'Draw', 'White')[(counter > -1) + (counter > 0)])


import os
white = 0
black = 0
for i in range(0, 8):
	list = input()
	for symbol in list:
		if symbol == 'Q':
			white += 9
		if symbol == 'R':
			white += 5
		if symbol == 'B':
			white += 3
		if symbol == 'N':
			white += 3
		if symbol == 'P':
			white += 1
		if symbol == 'q':
			black += 9
		if symbol == 'r':
			black += 5
		if symbol == 'b':
			black += 3
		if symbol == 'n':
			black += 3
		if symbol == 'p':
			black += 1
if black > white:
	print('Black')
elif white > black:
	print('White')
else:
	print('Draw')


sumw = 0
sumb = 0
for i in range(8):
	s = input()
	if 'q' in s:
		sumb += 9 * s.count('q')
	if 'r' in s:
		sumb += 5 * s.count('r')
	if 'b' in s:
		sumb += 3 * s.count('b')
	if 'n' in s:
		sumb += 3 * s.count('n')
	if 'p' in s:
		sumb += s.count('p')
	if 'Q' in s:
		sumw += 9 * s.count('Q')
	if 'R' in s:
		sumw += 5 * s.count('R')
	if 'B' in s:
		sumw += 3 * s.count('B')
	if 'N' in s:
		sumw += 3 * s.count('N')
	if 'P' in s:
		sumw += s.count('P')
if sumw > sumb:
	print('White')
elif sumw == sumb:
	print('Draw')
else:
	print('Black')


b = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
w = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
countb = countw = 0
for i in range(8):
	a = input()
	countb += a.count('q') * b['q'] + a.count('r') * b['r'] + a.count('b') * b['b'] + a.count('n') * b['n'] + a.count('p') * b['p']
	countw += a.count('Q') * w['Q'] + a.count('R') * w['R'] + a.count('B') * w['B'] + a.count('N') * w['N'] + a.count('P') * w['P']
print('White' if countw > countb else 'Black' if countb > countw else 'Draw')


ch = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
sum1 = 0
sum2 = 0
for i in range(8):
	for x in [i for i in list(input()) if i != '.']:
		if x.lower() in ch and x == x.upper():
			sum1 += ch.get(x.lower())
		elif x in ch and x == x.lower():
			sum2 += ch.get(x.lower())
if sum1 > sum2:
	print('White')
elif sum1 < sum2:
	print('Black')
else:
	print('Draw')


def main():
	chess = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0, '.': 0}
	ans = 0
	for i in range(8):
		row = input()
		for r in row:
			ans += chess[r]
	if ans == 0:
		print('Draw')
	elif ans > 0:
		print('White')
	else:
		print('Black')
main()


ref = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
white = 0
black = 0
for x in range(8):
	ch = list(input())
	filtered = [y for y in ch if y.upper() in ref.keys()]
	for y in filtered:
		if y not in ref.keys():
			black += ref[y.upper()]
		else:
			white += ref[y]
if white == black:
	print('Draw')
elif white > black:
	print('White')
else:
	print('Black')


val = [9, 5, 3, 3, 1]
nw = 'QRBNP'
nb = 'qrbnp'
C = [input() for i in range(8)]
w = b = 0
for i in range(8):
	for j in range(5):
		w += val[j] * str(C[i]).count(nw[j])
		b += val[j] * str(C[i]).count(nb[j])
if w > b:
	print('White')
elif w == b:
	print('Draw')
else:
	print('Black')


(Black, White) = (0, 0)
for i in range(8):
	chess = str(input())
	Black += chess.count('p') + chess.count('q') * 9 + chess.count('r') * 5 + chess.count('n') * 3 + chess.count('b') * 3
	White += chess.count('P') + chess.count('Q') * 9 + chess.count('R') * 5 + chess.count('N') * 3 + chess.count('B') * 3
if Black > White:
	print('Black')
elif White > Black:
	print('White')
else:
	print('Draw')


d1 = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
d2 = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
s1 = s2 = 0
for i in range(8):
	lB = [x for x in input()]
	for j in lB:
		if j in d1:
			s1 += d1[j]
		if j in d2:
			s2 += d2[j]
if s1 > s2:
	print('White')
elif s1 == s2:
	print('Draw')
else:
	print('Black')


cnt = 0
cnt2 = 0
for _ in range(8):
	s = input()
	for i in s:
		if i == 'Q':
			cnt += 9
		elif i == 'R':
			cnt += 5
		elif i == 'B':
			cnt += 3
		elif i == 'N':
			cnt += 3
		elif i == 'P':
			cnt += 1
		elif i == 'q':
			cnt2 += 9
		elif i == 'r':
			cnt2 += 5
		elif i == 'b':
			cnt2 += 3
		elif i == 'n':
			cnt2 += 3
		elif i == 'p':
			cnt2 += 1
if cnt > cnt2:
	print('White')
elif cnt < cnt2:
	print('Black')
else:
	print('Draw')


white_dict = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
Black_dict = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
white = 0
black = 0
ls = [input() for j in range(8)]
for i in range(0, 8):
	j = 0
	for j in range(0, len(ls[i])):
		if ord(ls[i][j]) >= 65 and ord(ls[i][j]) <= 90:
			white += white_dict[ls[i][j]]
		if ord(ls[i][j]) >= 97 and ord(ls[i][j]) <= 122:
			black += Black_dict[ls[i][j]]
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


weights = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
black_weight = 0
white_weight = 0
for i in range(8):
	row = input()
	for (figure, weight) in weights.items():
		black_weight += row.count(figure) * weight
		white_weight += row.count(figure.upper()) * weight
if black_weight < white_weight:
	print('White')
elif black_weight > white_weight:
	print('Black')
else:
	print('Draw')


figures = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(black_w, white_w) = (0, 0)
for _ in range(0, 8):
	row = input().strip()
	for c in row:
		if c.lower() in figures:
			if c.lower() == c:
				black_w += figures[c]
			else:
				white_w += figures[c.lower()]
if black_w == white_w:
	print('Draw')
elif black_w > white_w:
	print('Black')
else:
	print('White')


w = b = 0
d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
for _ in range(8):
	l = list(input())
	for i in l:
		if ord(i) >= 65 and ord(i) <= 90:
			w = w + d[i.lower()]
		elif ord(i) >= 97 and ord(i) <= 122:
			b += d[i]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


weight = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1}
score = 0
for i in range(8):
	line = list(input())
	for cell in line:
		if cell in weight:
			score += weight[cell]
if score > 0:
	print('White')
elif score < 0:
	print('Black')
else:
	print('Draw')


s = [''] * 8
for i in range(0, 8):
	s[i] = input()
white = {}
black = {}
white['Q'] = 9
white['R'] = 5
white['B'] = 3
white['N'] = 3
white['P'] = 1
white['q'] = 0
white['r'] = 0
white['b'] = 0
white['n'] = 0
white['p'] = 0
white['.'] = 0
white['K'] = 0
white['k'] = 0
black['Q'] = 0
black['R'] = 0
black['B'] = 0
black['N'] = 0
black['P'] = 0
black['q'] = 9
black['r'] = 5
black['b'] = 3
black['n'] = 3
black['p'] = 1
black['.'] = 0
black['K'] = 0
black['k'] = 0
w = 0
b = 0
for i in range(0, 8):
	for j in range(0, 8):
		w = w + white[s[i][j]]
		b = b + black[s[i][j]]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


white_team = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
black_team = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(w, b) = (0, 0)
for i in range(8):
	line = input()
	for el in line:
		if el in white_team:
			w += white_team[el]
		elif el in black_team:
			b += black_team[el]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


l = []
(ww, bw) = (0, 0)
for i in range(8):
	l.append(input())
for i in range(len(l)):
	for j in range(len(l[i])):
		if l[i][j] == 'Q':
			ww += 9
		elif l[i][j] == 'R':
			ww += 5
		elif l[i][j] == 'B':
			ww += 3
		elif l[i][j] == 'N':
			ww += 3
		elif l[i][j] == 'P':
			ww += 1
		elif l[i][j] == 'q':
			bw += 9
		elif l[i][j] == 'r':
			bw += 5
		elif l[i][j] == 'b':
			bw += 3
		elif l[i][j] == 'n':
			bw += 3
		elif l[i][j] == 'p':
			bw += 1
if ww > bw:
	print('White')
elif ww < bw:
	print('Black')
else:
	print('Draw')


d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'Q': -9, 'R': -5, 'B': -3, 'N': -3, 'P': -1, '.': 0, 'k': 0, 'K': 0}
s = sum([d[x] for i in range(8) for x in input()])
if s < 0:
	print('White')
elif s > 0:
	print('Black')
else:
	print('Draw')


weightFigure = {'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, '.': 0}
weightPosition = 0
for _ in range(8):
	weightPosition += sum((weightFigure[ch] for ch in input()))
if weightPosition > 0:
	print('White')
elif weightPosition == 0:
	print('Draw')
else:
	print('Black')


cw = 0
cb = 0
for i in range(8):
	L = list(input())
	for i in L:
		if ord(i) >= 97 and ord(i) <= 122:
			if i == 'q':
				cb += 9
			elif i == 'r':
				cb += 5
			elif i == 'b':
				cb += 3
			elif i == 'n':
				cb += 3
			elif i == 'p':
				cb += 1
		elif ord(i) >= 65 and ord(i) <= 90:
			if i == 'Q':
				cw += 9
			elif i == 'R':
				cw += 5
			elif i == 'B':
				cw += 3
			elif i == 'N':
				cw += 3
			elif i == 'P':
				cw += 1
if cw > cb:
	print('White')
elif cw == cb:
	print('Draw')
else:
	print('Black')


white = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
black = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
import string
white_w = 0
black_w = 0
for i in range(8):
	line = input()
	for c in line:
		if c != '.':
			if c in string.ascii_uppercase:
				white_w += white[c]
			else:
				black_w += black[c]
if white_w > black_w:
	print('White', end='')
elif white_w < black_w:
	print('Black', end='')
else:
	print('Draw', end='')


d = dict(zip('kpnbrq', [0, 1, 3, 3, 5, 9]))
(b, w) = (0, 0)
for i in range(8):
	for x in input():
		if x in d:
			b += d[x]
		elif x.lower() in d:
			w += d[x.lower()]
print('Draw' if b == w else 'White' if w > b else 'Black')


import sys
value = {'Q': 9, 'q': 9, 'R': 5, 'r': 5, 'B': 3, 'b': 3, 'N': 3, 'n': 3, 'P': 1, 'p': 1, 'K': 0, 'k': 0}
black = 0
white = 0
blackPieces = 'qrbnpk'
whitePieces = 'QRBNPK'
for line in sys.stdin:
	for i in range(len(line)):
		if line[i] in whitePieces:
			white += value[line[i]]
		elif line[i] in blackPieces:
			black += value[line[i]]
if white == black:
	print('Draw')
elif white > black:
	print('White')
else:
	print('Black')


board = []
for x in range(8):
	a = input('')
	board.append(a)
white = 0
black = 0

def evaluate(letter):
	if letter == 'Q' or letter == 'q':
		return 9
	if letter == 'R' or letter == 'r':
		return 5
	if letter == 'B' or letter == 'b':
		return 3
	if letter == 'N' or letter == 'n':
		return 3
	if letter == 'P' or letter == 'p':
		return 1
	if letter == 'K' or letter == 'k':
		return 0
	if letter == '.':
		return 0
for value in board:
	for val in value:
		if val.isupper():
			white = white + evaluate(val)
		else:
			black = black + evaluate(val)
if black > white:
	print('Black')
elif black == white:
	print('Draw')
elif black < white:
	print('White')


def findChess(arg: str) -> tuple:
	(black, white) = (0, 0)
	for i in arg:
		if i == 'Q':
			white += 9
		if i == 'R':
			white += 5
		if i == 'B':
			white += 3
		if i == 'N':
			white += 3
		if i == 'P':
			white += 1
		if i == 'q':
			black += 9
		if i == 'r':
			black += 5
		if i == 'b':
			black += 3
		if i == 'n':
			black += 3
		if i == 'p':
			black += 1
	return (white, black)
(whiteWeight, blackWeight) = (0, 0)
for i in range(8):
	string = input()
	tmpTuple = findChess(string)
	whiteWeight += tmpTuple[0]
	blackWeight += tmpTuple[1]
if whiteWeight > blackWeight:
	print('White')
elif blackWeight > whiteWeight:
	print('Black')
else:
	print('Draw')


chess = []
for i in range(8):
	chess.append(input())
s = 'qrbnpk'
w = [9, 5, 3, 3, 1, 0]
D = dict(list(zip(s, w)))
D1 = dict(list(zip(s.upper(), w)))
dic = dict.fromkeys(s, 0)
dic2 = dict.fromkeys(s.upper(), 1)
dic2.update(dic)
res = [0, 0]
for i in range(8):
	for j in range(8):
		if chess[i][j] != '.':
			res[dic2[chess[i][j]]] += D[chess[i][j].lower()]
first = res[0]
sec = res[1]
if first > sec:
	print('Black')
elif first == sec:
	print('Draw')
else:
	print('White')


white_count = 0
black_count = 0
for i in range(8):
	line = input()
	for j in range(len(line)):
		if line[j] == 'Q':
			white_count += 9
		elif line[j] == 'R':
			white_count += 5
		elif line[j] == 'B':
			white_count += 3
		elif line[j] == 'N':
			white_count += 3
		elif line[j] == 'P':
			white_count += 1
		elif line[j] == 'q':
			black_count += 9
		elif line[j] == 'r':
			black_count += 5
		elif line[j] == 'b':
			black_count += 3
		elif line[j] == 'n':
			black_count += 3
		elif line[j] == 'p':
			black_count += 1
if white_count > black_count:
	print('White')
elif black_count > white_count:
	print('Black')
else:
	print('Draw')


ls = []
chess = [['Q', 'q', 9], ['R', 'r', 5], ['B', 'b', 3], ['N', 'n', 3], ['P', 'p', 1]]
Blaceunit = 'QRBNP'
whiteunite = 'qrbnp'
white = 0
black = 0
for i in range(8):
	row = input().replace('.', '')
	for cha in row:
		for inner in range(len(chess)):
			if cha == chess[inner][0]:
				white += chess[inner][2]
				break
			elif cha == chess[inner][1]:
				black += chess[inner][2]
				break
if white > black:
	print('White')
elif white == black:
	print('Draw')
else:
	print('Black')


sw = 0
sb = 0
for i in range(8):
	s = input()
	for each in s:
		if each == 'Q':
			sw = sw + 9
		elif each == 'R':
			sw = sw + 5
		elif each == 'B':
			sw = sw + 3
		elif each == 'N':
			sw = sw + 3
		elif each == 'P':
			sw = sw + 1
		elif each == 'K':
			sw = sw + 0
		elif each == 'q':
			sb = sb + 9
		elif each == 'r':
			sb = sb + 5
		elif each == 'b':
			sb = sb + 3
		elif each == 'n':
			sb = sb + 3
		elif each == 'p':
			sb = sb + 1
		elif each == 'k':
			sb = sb + 0
if sw > sb:
	print('White')
elif sb > sw:
	print('Black')
else:
	print('Draw')


__author__ = 'thunder'
from sys import stdin
m = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
s = ''.join(stdin.readlines())
s = list(filter(lambda x: x.lower() in m, s))
w = sum([m[x.lower()] for x in s if x.isupper()])
b = sum([m[x] for x in s if x.islower()])
if w > b:
	print('White')
elif w == b:
	print('Draw')
else:
	print('Black')


arr = []
for i in range(8):
	strr = input()
	arr.append(strr)
player1 = 0
player2 = 0
for i in range(8):
	for j in range(8):
		if arr[i][j] == 'Q':
			player1 += 9
		elif arr[i][j] == 'R':
			player1 += 5
		elif arr[i][j] == 'B':
			player1 += 3
		elif arr[i][j] == 'N':
			player1 += 3
		elif arr[i][j] == 'P':
			player1 += 1
		elif arr[i][j] == 'q':
			player2 += 9
		elif arr[i][j] == 'r':
			player2 += 5
		elif arr[i][j] == 'b':
			player2 += 3
		elif arr[i][j] == 'n':
			player2 += 3
		elif arr[i][j] == 'p':
			player2 += 1
if player1 > player2:
	print('White')
elif player1 < player2:
	print('Black')
else:
	print('Draw')


a = [[j for j in input().strip()] for i in range(8)]
p = 0
q = 0
for i in a:
	for j in i:
		if j.isalpha() == True:
			if j == 'Q':
				p = p + 9
			elif j == 'q':
				q = q + 9
			elif j == 'R':
				p = p + 5
			elif j == 'r':
				q = q + 5
			elif j == 'B':
				p = p + 3
			elif j == 'b':
				q = q + 3
			elif j == 'N':
				p = p + 3
			elif j == 'n':
				q = q + 3
			elif j == 'P':
				p = p + 1
			elif j == 'p':
				q = q + 1
if p > q:
	print('White')
elif q > p:
	print('Black')
elif p == q:
	print('Draw')


y = []
x1 = 0
x2 = 0
y1 = []
y2 = []
figuri1 = ['q', 'r', 'b', 'n', 'p', 'k']
figuri2 = ['Q', 'R', 'B', 'N', 'P', 'K']
ochki = [9, 5, 3, 3, 1, 0]
for i in range(8):
	x = list(map(str, input()))
	y.append(x)
for i in range(8):
	for j in range(8):
		if y[i][j] in figuri1:
			y1.append(y[i][j])
		elif y[i][j] in figuri2:
			y2.append(y[i][j])
for i in range(len(y1)):
	for j in range(len(figuri1)):
		if y1[i] == figuri1[j]:
			x1 = x1 + ochki[j]
for i in range(len(y2)):
	for j in range(len(figuri2)):
		if y2[i] == figuri2[j]:
			x2 = x2 + ochki[j]
if x2 > x1:
	print('White')
elif x2 < x1:
	print('Black')
else:
	print('Draw')


dct = {'q': 9, 'r': 5, 'b': 3, 'k': 0, 'n': 3, 'p': 1, 'Q': -9, 'R': -5, 'B': -3, 'K': -0, 'N': -3, 'P': -1}
ans = 0
for i in range(8):
	for inp in input():
		if inp == '.':
			ans = ans + 0
		else:
			ans = ans + dct[inp]
if ans == 0:
	print('Draw')
elif ans < 0:
	print('White')
else:
	print('Black')


game = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
mylist = ['q', 'r', 'b', 'n', 'p', 'k']
first = []
sec = []
for _ in range(8):
	k = input()
	for i in k:
		if i in mylist:
			first.append(game[i])
		elif i in [x.upper() for x in mylist]:
			sec.append(game[i.lower()])
if sum(first) > sum(sec):
	print('Black')
elif sum(first) < sum(sec):
	print('White')
else:
	print('Draw')


white = black = 0
piecedict = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
for _ in range(8):
	s = input()
	for i in range(8):
		if s[i] in piecedict:
			white += piecedict[s[i]]
		elif s[i] not in piecedict and s[i].upper() in piecedict:
			black += piecedict[s[i].upper()]
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


bp = ['q', 'r', 'b', 'n', 'p', 'k']
wp = ['Q', 'R', 'B', 'N', 'P', 'K']
ps = [9, 5, 3, 3, 1, 0]
w = 0
b = 0
for i in range(8):
	line = input()
	for (i, l) in enumerate(line):
		if l in bp:
			b += ps[bp.index(l)]
		if l in wp:
			w += ps[wp.index(l)]
if w == b:
	print('Draw')
elif w > b:
	print('White')
else:
	print('Black')


def val(x):
	if x == 'q' or x == 'Q':
		return 9
	if x == 'r' or x == 'R':
		return 5
	if x == 'b' or x == 'B':
		return 3
	if x == 'n' or x == 'N':
		return 3
	if x == 'p' or x == 'P':
		return 1
	if x == 'k' or x == 'K':
		return 0
(white, black) = (0, 0)
for i in range(8):
	n = input()
	for i in n:
		if i != '.':
			if i.islower():
				black += int(val(i))
			else:
				white += int(val(i))
if white == black:
	print('Draw')
else:
	print('Black' if black > white else 'White')


A = [list(map(str, input())) for i in range(8)]
s1 = 0
s2 = 0
for i in range(8):
	for j in range(8):
		if A[i][j] == 'Q':
			s1 += 9
		elif A[i][j] == 'R':
			s1 += 5
		elif A[i][j] == 'B' or A[i][j] == 'N':
			s1 += 3
		elif A[i][j] == 'P':
			s1 += 1
		elif A[i][j] == 'q':
			s2 += 9
		elif A[i][j] == 'r':
			s2 += 5
		elif A[i][j] == 'b' or A[i][j] == 'n':
			s2 += 3
		elif A[i][j] == 'p':
			s2 += 1
if s1 > s2:
	print('White')
elif s1 == s2:
	print('Draw')
elif s1 < s2:
	print('Black')


d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
f = {'m': 0, 'z': 0}
for k in range(8):
	a = input()
	for j in a:
		if j != '.' and j in 'qprbnk':
			f['z'] += d[j]
		if j != '.' and j in 'QRBNKP':
			f['m'] += d[j]
if f['m'] > f['z']:
	print('White')
elif f['m'] == f['z']:
	print('Draw')
else:
	print('Black')


(weight, w, b) = ({'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}, 0, 0)
for i in range(8):
	s = input()
	for j in s:
		if j not in 'Kk.':
			if j.isupper():
				w += weight[j.lower()]
			else:
				b += weight[j]
print('White' if w > b else 'Black' if b > w else 'Draw')


white = 0
black = 0
chess = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
for i in range(8):
	r = input()
	for j in range(8):
		if r[j] != '.':
			if r[j].islower():
				black += chess[r[j]]
			else:
				white += chess[r[j].lower()]
if white == black:
	print('Draw')
elif white > black:
	print('White')
else:
	print('Black')


def points(s):
	if s == 'q':
		return 9
	if s == 'r':
		return 5
	if s == 'b':
		return 3
	if s == 'n':
		return 3
	if s == 'p':
		return 1
	return 0
s_wh = 0
s_bl = 0
for i in range(8):
	s = input()
	for j in s:
		if j.isupper():
			s_wh += points(j.lower())
		else:
			s_bl += points(j)
if s_wh > s_bl:
	print('White')
elif s_wh == s_bl:
	print('Draw')
else:
	print('Black')


def main():
	from sys import stdin, stdout
	score = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
	white = 0
	dark = 0
	for _ in range(8):
		for i in stdin.readline().strip():
			if i == '.':
				continue
			elif i in 'qrbnpk':
				dark += score[i]
			else:
				white += score[i.lower()]
	if white > dark:
		stdout.write('White')
	elif white == dark:
		stdout.write('Draw')
	else:
		stdout.write('Black')
main()


import sys
EXAMPLE1 = '\n...QK...\n........\n........\n........\n........\n........\n........\n...rk...\n'
EXAMPLE2 = '\nrnbqkbnr\npppppppp\n........\n........\n........\n........\nPPPPPPPP\nRNBQKBNR\n'
EXAMPLE3 = '\nrppppppr\n...k....\n........\n........\n........\n........\nK...Q...\n........\n'
weights = {'K': 0, 'k': 0, '.': 0, '\n': 0, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1}

def tally(board):
	t = 0
	for i in board:
		t += weights[i]
	return t

def award(score):
	result = 'Draw'
	if score > 0:
		result = 'White'
	elif score < 0:
		result = 'Black'
	return result
print(award(tally(sys.stdin.read())))


import re
players = 'Q9R5B3N3P1K0'
i = 0
board = ''
while i < 8:
	board += input()
	i += 1
black_weight = 0
white_weight = 0
for i in range(len(board)):
	if board[i] != '.':
		x = re.search('[a-z]', board[i])
		if x:
			value = players.find(board[i].upper())
			black_weight += int(players[value + 1])
		else:
			value = players.find(board[i].upper())
			white_weight += int(players[value + 1])
if white_weight > black_weight:
	print('White')
elif white_weight < black_weight:
	print('Black')
else:
	print('Draw')


r1 = input()
r2 = input()
r3 = input()
r4 = input()
r5 = input()
r6 = input()
r7 = input()
r8 = input()
blackCounter = 0
board = (r1, r2, r3, r4, r5, r6, r7, r8)
scores = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'Q': -9, 'R': -5, 'B': -3, 'N': -3, 'P': -1}
for row in board:
	for square in row:
		if square in scores:
			blackCounter += scores[square]
if blackCounter < 0:
	print('White')
elif blackCounter > 0:
	print('Black')
else:
	print('Draw')


weights = [9, 5, 3, 3, 1, 0]
pieces = ['Q', 'R', 'B', 'N', 'P', 'K']
white = 0
black = 0
for x in range(8):
	row = input()
	for y in row:
		if y.upper() in pieces:
			weight = weights[pieces.index(y.upper())]
			if y == y.upper():
				white += weight
			else:
				black += weight
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


import sys
a = 0
b = 0
c = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
for i in sys.stdin:
	for j in i:
		if j in c.keys():
			a += c[j]
		elif j.upper() in c.keys():
			b += c[j.upper()]
if a > b:
	print('White')
elif a < b:
	print('Black')
else:
	print('Draw')


white = {'K': 0, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
black = {'k': 0, 'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
(w_weight, b_weight) = (0, 0)
for _ in range(8):
	line = input()
	for s in line:
		if s.isupper():
			w_weight += white[s]
		if s.islower():
			b_weight += black[s]
if w_weight > b_weight:
	print('White')
elif b_weight > w_weight:
	print('Black')
else:
	print('Draw')


s1 = input()
s2 = input()
s3 = input()
s4 = input()
s5 = input()
s6 = input()
s7 = input()
s8 = input()
s = [s1, s2, s3, s4, s5, s6, s7, s8]
white = 0
black = 0
for i in range(8):
	for j in range(8):
		if s[i][j] != '.':
			if s[i][j] == 'Q':
				white += 9
			elif s[i][j] == 'q':
				black += 9
			elif s[i][j] == 'R':
				white += 5
			elif s[i][j] == 'r':
				black += 5
			elif s[i][j] == 'B' or s[i][j] == 'N':
				white += 3
			elif s[i][j] == 'b' or s[i][j] == 'n':
				black += 3
			elif s[i][j] == 'P':
				white += 1
			elif s[i][j] == 'p':
				black += 1
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


import sys
white = 0
black = 0
whSh = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
for i in range(8):
	stin = sys.stdin.readline()
	for j in range(8):
		if stin[j] != '.':
			k = stin[j]
			if k.isupper():
				white += whSh[k]
			else:
				black += whSh[k.upper()]
if black > white:
	print('Black')
elif white > black:
	print('White')
else:
	print('Draw')


white = {'K': 0, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, '.': 0}
(wt, bt) = (0, 0)
for _ in range(8):
	line = input()
	for s in line:
		if s.isupper():
			wt += white[s]
		else:
			bt += white[s.upper()]
if wt > bt:
	print('White')
elif bt > wt:
	print('Black')
else:
	print('Draw')


d = {}
d['.'] = 0
d['Q'] = 9
d['R'] = 5
d['B'] = 3
d['N'] = 3
d['P'] = 1
d['K'] = 0
t = 0
for _ in range(8):
	s = input()
	for c in s:
		if c in d:
			t += d[c]
		elif c.upper() in d:
			t -= d[c.upper()]
if t > 0:
	print('White')
elif t < 0:
	print('Black')
else:
	print('Draw')


from sys import stdin, stdout, stderr, setrecursionlimit
setrecursionlimit(100000)

def debug(*e):
	if not __debug__:
		print(*e, file=stderr)

def dd(*vals):
	import inspect, re
	frame = inspect.getframeinfo(inspect.stack()[1][0])
	vs = re.search('dd\\((.+)\\)', frame.code_context[0]).group(1).split(',')
	if vs:
		debug(','.join(('{0} = {1}'.format(vs[i], v) for (i, v) in enumerate(vals))))

def trace(f):

	def traced(*args, **kw):
		debug('calling {} with args {}, {}'.format(f.__name__, args, kw))
		return f(*args, **kw)
	return traced

def read():
	return stdin.readline().rstrip()

def readarr(sep=None, maxsplit=-1):
	return read().split(sep, maxsplit)

def readint():
	return int(read())

def readintarr(sep=None, maxsplit=-1):
	return [int(a) for a in readarr(sep, maxsplit)]

def write(*args, **kwargs):
	sep = kwargs.get('sep', ' ')
	end = kwargs.get('end', '\n')
	stdout.write(sep.join((str(a) for a in args)) + end)

def writearr(arr, sep=' ', end='\n'):
	stdout.write(sep.join((str(a) for a in arr)) + end)
vals = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(w, b) = (0, 0)
for _ in range(8):
	s = read()
	for c in s:
		if c != '.':
			if c.isupper():
				w += vals[c.lower()]
			else:
				b += vals[c]
write('White' if w > b else 'Black' if b > w else 'Draw')


d = {'r': 5, 'b': 3, 'n': 3, 'q': 9, 'p': 1}
p = 0
for _ in range(8):
	for i in input():
		p += d.get(i.lower(), 0) * (-1 + 2 * i.isupper())
print('White' if p > 0 else ['Black', 'Draw'][not p])


idi = 'qrbnpkQRBNPK'
ves = [9, 5, 3, 3, 1, 0, -9, -5, -3, -3, -1, 0]
suma = 0
for i in range(8):
	temp = input()
	for j in temp:
		if j != '.':
			suma += ves[idi.find(j)]
if suma == 0:
	print('Draw')
elif suma < 0:
	print('White')
else:
	print('Black')


boardWeight = 0
pieceWeights = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0, '.': 0}
for row in range(8):
	letters = input()
	for i in range(8):
		piece = letters[i]
		boardWeight += pieceWeights[piece]
if boardWeight > 0:
	print('White')
elif boardWeight < 0:
	print('Black')
else:
	print('Draw')


white = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
black = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
white_score = 0
black_score = 0
for _ in range(8):
	s = input()
	for x in s:
		if x in white:
			white_score += white[x]
		elif x in black:
			black_score += black[x]
if black_score == white_score:
	print('Draw')
elif black_score > white_score:
	print('Black')
else:
	print('White')


l = []
w = 0
b = 0
for i in range(1, 9):
	s = input()
	l.append(s)
s1 = ''.join(l)
for i in s1:
	if 65 <= ord(i) <= 90:
		if i == 'Q':
			w += 9
		if i == 'R':
			w += 5
		if i == 'B':
			w += 3
		if i == 'N':
			w += 3
		if i == 'P':
			w += 1
	elif 97 <= ord(i) <= 122:
		if i == 'q':
			b += 9
		if i == 'r':
			b += 5
		if i == 'b':
			b += 3
		if i == 'n':
			b += 3
		if i == 'p':
			b += 1
if w == b:
	print('Draw')
if w > b:
	print('White')
if w < b:
	print('Black')


n = 8
w = 0
b = 0
i = 0
while n > 0:
	i = 0
	x = input()
	while i < len(x):
		if x[i] == 'Q':
			w += 9
		elif x[i] == 'R':
			w += 5
		elif x[i] == 'B' or x[i] == 'N':
			w += 3
		elif x[i] == 'P':
			w += 1
		elif x[i] == 'q':
			b += 9
		elif x[i] == 'r':
			b += 5
		elif x[i] == 'b' or x[i] == 'n':
			b += 3
		elif x[i] == 'p':
			b += 1
		i += 1
	n -= 1
if b > w:
	print('Black')
elif b < w:
	print('White')
else:
	print('Draw')


w = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0, '.': 0}
pos = ''.join((input() for _ in range(8)))
s = sum((w[c] for c in pos))
if s > 0:
	print('White')
elif s == 0:
	print('Draw')
else:
	print('Black')


board = ''
for k in range(8):
	board += input()
score = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
(black, white) = (0, 0)
for e in board:
	if e.islower():
		black += score[e]
	else:
		white += score[e.lower()]
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


lines = ''
for i in range(8):
	lines += input()
white = 0
black = 0
i = 0
while i < 8:
	if lines[i] == 'q':
		black += 9
	elif lines[i] == 'r':
		black += 5
	elif lines[i] == 'b':
		black += 3
	elif lines[i] == 'n':
		black += 3
	elif lines[i] == 'p':
		black += 1
	elif lines[i] == 'Q':
		white += 9
	elif lines[i] == 'R':
		white += 5
	elif lines[i] == 'B':
		white += 3
	elif lines[i] == 'N':
		white += 3
	elif lines[i] == 'P':
		white += 1
	if lines[i + 8] == 'q':
		black += 9
	elif lines[i + 8] == 'r':
		black += 5
	elif lines[i + 8] == 'b':
		black += 3
	elif lines[i + 8] == 'n':
		black += 3
	elif lines[i + 8] == 'p':
		black += 1
	elif lines[i + 8] == 'Q':
		white += 9
	elif lines[i + 8] == 'R':
		white += 5
	elif lines[i + 8] == 'B':
		white += 3
	elif lines[i + 8] == 'N':
		white += 3
	elif lines[i + 8] == 'P':
		white += 1
	if lines[i + 16] == 'q':
		black += 9
	elif lines[i + 16] == 'r':
		black += 5
	elif lines[i + 16] == 'b':
		black += 3
	elif lines[i + 16] == 'n':
		black += 3
	elif lines[i + 16] == 'p':
		black += 1
	elif lines[i + 16] == 'Q':
		white += 9
	elif lines[i + 16] == 'R':
		white += 5
	elif lines[i + 16] == 'B':
		white += 3
	elif lines[i + 16] == 'N':
		white += 3
	elif lines[i + 16] == 'P':
		white += 1
	if lines[i + 24] == 'q':
		black += 9
	elif lines[i + 24] == 'r':
		black += 5
	elif lines[i + 24] == 'b':
		black += 3
	elif lines[i + 24] == 'n':
		black += 3
	elif lines[i + 24] == 'p':
		black += 1
	elif lines[i + 24] == 'Q':
		white += 9
	elif lines[i + 24] == 'R':
		white += 5
	elif lines[i + 24] == 'B':
		white += 3
	elif lines[i + 24] == 'N':
		white += 3
	elif lines[i + 24] == 'P':
		white += 1
	if lines[i + 32] == 'q':
		black += 9
	elif lines[i + 32] == 'r':
		black += 5
	elif lines[i + 32] == 'b':
		black += 3
	elif lines[i + 32] == 'n':
		black += 3
	elif lines[i + 32] == 'p':
		black += 1
	elif lines[i + 32] == 'Q':
		white += 9
	elif lines[i + 32] == 'R':
		white += 5
	elif lines[i + 32] == 'B':
		white += 3
	elif lines[i + 32] == 'N':
		white += 3
	elif lines[i + 32] == 'P':
		white += 1
	if lines[i + 40] == 'q':
		black += 9
	elif lines[i + 40] == 'r':
		black += 5
	elif lines[i + 40] == 'b':
		black += 3
	elif lines[i + 40] == 'n':
		black += 3
	elif lines[i + 40] == 'p':
		black += 1
	elif lines[i + 40] == 'Q':
		white += 9
	elif lines[i + 40] == 'R':
		white += 5
	elif lines[i + 40] == 'B':
		white += 3
	elif lines[i + 40] == 'N':
		white += 3
	elif lines[i + 40] == 'P':
		white += 1
	if lines[i + 48] == 'q':
		black += 9
	elif lines[i + 48] == 'r':
		black += 5
	elif lines[i + 48] == 'b':
		black += 3
	elif lines[i + 48] == 'n':
		black += 3
	elif lines[i + 48] == 'p':
		black += 1
	elif lines[i + 48] == 'Q':
		white += 9
	elif lines[i + 48] == 'R':
		white += 5
	elif lines[i + 48] == 'B':
		white += 3
	elif lines[i + 48] == 'N':
		white += 3
	elif lines[i + 48] == 'P':
		white += 1
	if lines[i + 56] == 'q':
		black += 9
	elif lines[i + 56] == 'r':
		black += 5
	elif lines[i + 56] == 'b':
		black += 3
	elif lines[i + 56] == 'n':
		black += 3
	elif lines[i + 56] == 'p':
		black += 1
	elif lines[i + 56] == 'Q':
		white += 9
	elif lines[i + 56] == 'R':
		white += 5
	elif lines[i + 56] == 'B':
		white += 3
	elif lines[i + 56] == 'N':
		white += 3
	elif lines[i + 56] == 'P':
		white += 1
	i += 1
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


white = 0
black = 0
for _ in range(8):
	line = input()
	for pos in line:
		if pos == '.':
			white += 0
		elif pos == 'Q':
			white += 9
		elif pos == 'R':
			white += 5
		elif pos == 'B' or pos == 'N':
			white += 3
		elif pos == 'P':
			white += 1
		elif pos == 'q':
			black += 9
		elif pos == 'r':
			black += 5
		elif pos == 'b' or pos == 'n':
			black += 3
		elif pos == 'p':
			black += 1
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


pieces = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
l = ''
s = 0
for _ in range(8):
	l += input()
l = ''.join(l.split('.'))
for i in range(len(l)):
	s += pieces[l[i].lower()] * (-1, 1)[l[i].isupper()]
if s == 0:
	print('Draw')
elif s > 0:
	print('White')
else:
	print('Black')


D = {'Q': 9, 'K': 0, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
d = {'q': 9, 'k': 0, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
li = []
for i in range(8):
	li.append(input())
(w, b) = (0, 0)
for s in li:
	for i in s:
		if i != '.' and i.isupper():
			w += D[i]
		elif i != '.' and i.islower():
			b += d[i]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


Black = 0
white = 0
for i in range(8):
	l = str(input())
	for j in range(8):
		if l[j] == 'q':
			Black += 9
		if l[j] == 'r':
			Black += 5
		if l[j] == 'b':
			Black += 3
		if l[j] == 'n':
			Black += 3
		if l[j] == 'p':
			Black += 1
		if l[j] == 'Q':
			white += 9
		if l[j] == 'R':
			white += 5
		if l[j] == 'B':
			white += 3
		if l[j] == 'N':
			white += 3
		if l[j] == 'P':
			white += 1
if Black > white:
	print('Black')
elif Black < white:
	print('White')
else:
	print('Draw')


white = 0
black = 0
chess = []
for i in range(8):
	line = input()
	for j in range(8):
		x = line[j]
		if x == 'Q':
			white += 9
		if x == 'R':
			white += 5
		if x == 'B':
			white += 3
		if x == 'N':
			white += 3
		if x == 'P':
			white += 1
		if x == 'K':
			white += 0
		if x == 'q':
			black += 9
		if x == 'r':
			black += 5
		if x == 'b':
			black += 3
		if x == 'n':
			black += 3
		if x == 'p':
			black += 1
		if x == 'k':
			black += 0
if white > black:
	print('White')
if black > white:
	print('Black')
if black == white:
	print('Draw')


board = []
for i in range(8):
	s = input()
	board.append(s)
white = 0
black = 0
for i in board:
	Q = i.count('Q')
	R = i.count('R')
	B = i.count('B')
	N = i.count('N')
	P = i.count('P')
	q = i.count('q')
	r = i.count('r')
	b = i.count('b')
	n = i.count('n')
	p = i.count('p')
	w1 = 9 * Q + 5 * R + 3 * N + 3 * B + P
	b1 = 9 * q + 5 * r + 3 * n + 3 * b + p
	white += w1
	black += b1
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

def read_int():
	return int(stdin.readline())

def read_ints():
	return [int(x) for x in stdin.readline().split()]

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]
All = 'QRBNPKqrbnpk.'
val = [9, 5, 3, 3, 1, 0, -9, -5, -3, -3, -1, 0, 0]
dicts = dict(zip(All, val))
result = sum([dicts[i] for _ in range(8) for i in read_str()])
print('Draw' if result == 0 else ['White', 'Black'][result < 0])


black = 0
white = 0
for i in range(8):
	l = input().strip()
	for c in l:
		if c == 'q':
			black += 9
		elif c == 'Q':
			white += 9
		elif c == 'r':
			black += 5
		elif c == 'R':
			white += 5
		elif c == 'n' or c == 'b':
			black += 3
		elif c == 'N' or c == 'B':
			white += 3
		elif c == 'p':
			black += 1
		elif c == 'P':
			white += 1
if black > white:
	print('Black')
elif white > black:
	print('White')
else:
	print('Draw')


w = 0
b = 0
x = input()
for i in range(7):
	x += input()
lnx = len(x)
for i in range(lnx):
	if x[i] == 'Q':
		w += 9
	elif x[i] == 'R':
		w += 5
	elif x[i] == 'B':
		w += 3
	elif x[i] == 'N':
		w += 3
	elif x[i] == 'P':
		w += 1
	elif x[i] == 'q':
		b += 9
	elif x[i] == 'r':
		b += 5
	elif x[i] == 'b':
		b += 3
	elif x[i] == 'n':
		b += 3
	elif x[i] == 'p':
		b += 1
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


figure_cost = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(dark, white) = (0, 0)
for _ in range(8):
	for s in input():
		if s != '.':
			if s == s.upper():
				white += figure_cost[s.lower()]
			else:
				dark += figure_cost[s]
if white > dark:
	print('White')
elif white == dark:
	print('Draw')
else:
	print('Black')


ww = 0
wb = 0
for i in range(8):
	string = input()
	ww += string.count('Q') * 9 + string.count('R') * 5 + string.count('B') * 3 + string.count('N') * 3 + string.count('P')
	wb += string.count('q') * 9 + string.count('r') * 5 + string.count('b') * 3 + string.count('n') * 3 + string.count('p')
if ww > wb:
	print('White')
elif ww < wb:
	print('Black')
else:
	print('Draw')


black = ['q', 'r', 'b', 'n', 'p', 'k']
white = ['Q', 'R', 'B', 'N', 'P', 'K']
points = [9, 5, 3, 3, 1, 0]
arr1 = list(input())
arr2 = list(input())
arr3 = list(input())
arr4 = list(input())
arr5 = list(input())
arr6 = list(input())
arr7 = list(input())
arr8 = list(input())
white_total = 0
black_total = 0
for i in arr1:
	if i in white:
		temp = white.index(i)
		white_total += points[temp]
	elif i in black:
		temp = black.index(i)
		black_total += points[temp]
for i in arr2:
	if i in white:
		temp = white.index(i)
		white_total += points[temp]
	elif i in black:
		temp = black.index(i)
		black_total += points[temp]
for i in arr3:
	if i in white:
		temp = white.index(i)
		white_total += points[temp]
	elif i in black:
		temp = black.index(i)
		black_total += points[temp]
for i in arr4:
	if i in white:
		temp = white.index(i)
		white_total += points[temp]
	elif i in black:
		temp = black.index(i)
		black_total += points[temp]
for i in arr5:
	if i in white:
		temp = white.index(i)
		white_total += points[temp]
	elif i in black:
		temp = black.index(i)
		black_total += points[temp]
for i in arr6:
	if i in white:
		temp = white.index(i)
		white_total += points[temp]
	elif i in black:
		temp = black.index(i)
		black_total += points[temp]
for i in arr7:
	if i in white:
		temp = white.index(i)
		white_total += points[temp]
	elif i in black:
		temp = black.index(i)
		black_total += points[temp]
for i in arr8:
	if i in white:
		temp = white.index(i)
		white_total += points[temp]
	elif i in black:
		temp = black.index(i)
		black_total += points[temp]
if white_total == black_total:
	print('Draw')
elif white_total > black_total:
	print('White')
else:
	print('Black')


board = ''
for abc in range(8):
	board += input()
(black, white) = (0, 0)
pieces = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
for key in pieces:
	a = board.count(key)
	black += a * pieces[key]
	b = board.count(key.upper())
	white += b * pieces[key]
if black != white:
	print('White' if white > black else 'Black')
else:
	print('Draw')


a = 'qrbnpk'
A = 'QRBNPK'
b = '953310'
x = 0
for i in range(8):
	d = input()
	for j in range(8):
		if d[j] in a:
			v = a.index(d[j])
			x -= int(b[v])
		elif d[j] in A:
			v = A.index(d[j])
			x += int(b[v])
if x == 0:
	print('Draw')
elif x > 0:
	print('White')
else:
	print('Black')


W = ['Q', 'R', 'B', 'N', 'P', 'K']
B = ['q', 'r', 'b', 'n', 'p', 'k']
p = [9, 5, 3, 3, 1, 0]
board = []
for i in range(8):
	board.append(input())
w = 0
b = 0
for i in board:
	for j in range(8):
		if i[j] == '.':
			continue
		elif i[j] in W:
			a = W.index(i[j])
			w += p[a]
		elif i[j] in B:
			a = B.index(i[j])
			b += p[a]
if w > b:
	print('White')
elif w == b:
	print('Draw')
else:
	print('Black')


wb = 0
ww = 0
d = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
for j in range(8):
	s = input()
	for i in range(8):
		if 65 <= ord(s[i]) and ord(s[i]) <= 90 and (s[i] != 'K'):
			ww += d[s[i]]
		if 97 <= ord(s[i]) and ord(s[i]) <= 122 and (s[i] != 'k'):
			wb += d[chr(ord(s[i]) - 32)]
if ww == wb:
	print('Draw')
elif ww < wb:
	print('Black')
elif ww > wb:
	print('White')


weights = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
chess = ''
white = 0
black = 0
for i in range(8):
	chess += input()
for key in weights.keys():
	white += weights.get(key) * chess.count(key)
	black += weights.get(key) * chess.count(key.lower())
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


class CodeforcesTask519ASolution:

	def __init__(self):
		self.result = ''
		self.board = ''

	def read_input(self):
		for x in range(8):
			self.board += input()

	def process_task(self):
		points = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, '.': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0}
		result = 0
		for point in self.board:
			result += points[point]
		if not result:
			self.result = 'Draw'
		elif result > 0:
			self.result = 'White'
		else:
			self.result = 'Black'

	def get_result(self):
		return self.result
Solution = CodeforcesTask519ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


c = []
for i in range(8):
	c.append(input())
d1 = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
d2 = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
(bl, wh) = (0, 0)
for i in range(8):
	for j in range(8):
		if c[i][j] in d1.keys():
			wh += d1.get(c[i][j])
		elif c[i][j] in d2.keys():
			bl += d2.get(c[i][j])
if bl == wh:
	print('Draw')
elif bl > wh:
	print('Black')
else:
	print('White')


m = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'Q': -9, 'R': -5, 'B': -3, 'N': -3, 'P': -1}
v = sum([sum([m.get(c, 0) for c in input()]) for _ in range(8)])
print('Draw') if v == 0 else print('White') if v < 0 else print('Black')


s1 = input()
s2 = input()
s3 = input()
s4 = input()
s5 = input()
s6 = input()
s7 = input()
s8 = input()
l = [s1, s2, s3, s4, s5, s6, s7, s8]
a = 0
b = 0
for i in range(8):
	for j in range(8):
		if l[i][j] == 'Q':
			a += 9
		elif l[i][j] == 'R':
			a += 5
		elif l[i][j] == 'B':
			a += 3
		elif l[i][j] == 'N':
			a += 3
		elif l[i][j] == 'P':
			a += 1
		elif l[i][j] == 'q':
			b += 9
		elif l[i][j] == 'r':
			b += 5
		elif l[i][j] == 'b':
			b += 3
		elif l[i][j] == 'n':
			b += 3
		elif l[i][j] == 'p':
			b += 1
		else:
			pass
if a > b:
	print('White')
elif a < b:
	print('Black')
else:
	print('Draw')


matrix = [[i for i in input()] for j in range(8)]
mass1 = 0
mass2 = 0
for i in matrix:
	for j in i:
		if j == 'Q':
			mass1 += 9
		if j == 'R':
			mass1 += 5
		if j in ['B', 'N']:
			mass1 += 3
		if j == 'P':
			mass1 += 1
		if j == 'q':
			mass2 += 9
		if j == 'r':
			mass2 += 5
		if j in ['b', 'n']:
			mass2 += 3
		if j == 'p':
			mass2 += 1
if mass1 > mass2:
	print('White')
if mass1 == mass2:
	print('Draw')
if mass1 < mass2:
	print('Black')


p = dict(q=9, Q=-9, r=5, R=-5, b=3, B=-3, n=3, N=-3, p=1, P=-1)
s = 0
for i in range(8):
	for j in input():
		if j in p:
			s += p[j]
print(['Draw', 'Black', 'White'][(s > 0) - (s < 0)])


import sys
dict = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
white = black = 0
s = sys.stdin.read()
for i in range(len(s)):
	if 64 < ord(s[i]) < 91:
		white = white + dict[chr(ord(s[i]) + 32)]
	elif 96 < ord(s[i]) < 123:
		black = black + dict[s[i]]
print('Draw' if white == black else ['White', 'Black'][black > white])


d = dict(zip('qrbnpk', [9, 5, 3, 3, 1, 0]))
(w, b) = (0, 0)
for i in range(8):
	s = input()
	for j in range(len(s)):
		if s[j].islower():
			b += d[s[j]]
		elif s[j].isupper():
			w += d[s[j].lower()]
if b > w:
	print('Black')
elif b == w:
	print('Draw')
else:
	print('White')


d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
s = ''
for i in range(8):
	s = s + input()
s = s.replace('.', '')
W = 0
B = 0
for i in s:
	if i.isupper():
		W = W + d[i]
	elif i.islower():
		B = B + d[i]
if B > W:
	print('Black')
elif B < W:
	print('White')
else:
	print('Draw')


white_counter = 0
black_counter = 0
for i in range(8):
	n = input()
	for d in range(0, 8):
		if n[d] == 'Q':
			white_counter += 9
		if n[d] == 'B':
			white_counter += 3
		if n[d] == 'P':
			white_counter += 1
		if n[d] == 'R':
			white_counter += 5
		if n[d] == 'N':
			white_counter += 3
		if n[d] == 'q':
			black_counter += 9
		if n[d] == 'b':
			black_counter += 3
		if n[d] == 'p':
			black_counter += 1
		if n[d] == 'r':
			black_counter += 5
		if n[d] == 'n':
			black_counter += 3
if white_counter > black_counter:
	print('White')
if white_counter < black_counter:
	print('Black')
if white_counter == black_counter:
	print('Draw')


FIGURE_SCORING = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
board = [input().strip() for _ in range(8)]
(white_score, black_score) = (0, 0)
for row in board:
	for cell in row:
		if cell.isupper():
			white_score += FIGURE_SCORING[cell.lower()]
		elif cell.islower():
			black_score += FIGURE_SCORING[cell]
if white_score > black_score:
	print('White')
elif black_score > white_score:
	print('Black')
else:
	print('Draw')


weights = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(white, black) = (0, 0)
for i in range(8):
	row = str(input())
	for j in row:
		if j.isalpha():
			if j.islower():
				black += weights.get(j)
			else:
				white += weights.get(j.lower())
if black > white:
	print('Black')
elif white > black:
	print('White')
else:
	print('Draw')


import string
weight = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
table = [input() for i in range(8)]
white = 0
black = 0
for i in range(8):
	for j in range(8):
		if table[i][j] in string.ascii_lowercase:
			black += weight[table[i][j]]
		elif table[i][j] in string.ascii_uppercase:
			white += weight[table[i][j].lower()]
if black > white:
	print('Black')
elif black < white:
	print('White')
else:
	print('Draw')


w = b = 0
d = {'r': 5, 'n': 3, 'b': 3, 'p': 1, 'k': 0, 'q': 9}
for i in range(8):
	s = input()
	for j in s:
		if j == '.':
			continue
		if j.isupper():
			w += d[j.lower()]
		else:
			b += d[j]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


wight = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
(p1, p2) = [0, 0]
for i in range(8):
	for j in input():
		if j.isupper():
			p2 += wight.get(j.lower(), 0)
		else:
			p1 += wight.get(j, 0)
if p2 > p1:
	print('White')
elif p1 > p2:
	print('Black')
else:
	print('Draw')


def str_inp(n):
	return [input() for x in range(n)]
from collections import *
(s, dic) = (str_inp(8), defaultdict(int, {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, '.': 0}))
(white, black) = (0, 0)
for i in range(8):
	for j in range(8):
		if s[i][j].isupper():
			white += dic[s[i][j].lower()]
		else:
			black += dic[s[i][j]]
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


m = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
m2 = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
t1 = 0
t2 = 0
for _ in range(8):
	line = input()
	for i in line:
		if i == '.':
			continue
		if i in m:
			t1 += m[i]
		if i in m2:
			t2 += m2[i]
if t1 == t2:
	print('Draw')
elif t1 > t2:
	print('Black')
else:
	print('White')


l = []
d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
b = 0
w = 0
for i in range(8):
	l.append(input())
for i in l:
	for j in range(len(i)):
		if i[j].islower():
			b += d[i[j]]
		elif i[j].isupper():
			a = i[j].lower()
			w += d[a]
if b > w:
	print('Black')
elif b == w:
	print('Draw')
elif b < w:
	print('White')


(ChessWeight, AandB) = ({'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}, [0, 0])
for i in range(8):
	X = input()
	for piece in X:
		if piece not in '.kK':
			if piece.isupper():
				AandB[0] += ChessWeight[piece.lower()]
			else:
				AandB[1] += ChessWeight[piece]
print('Draw' if AandB[0] == AandB[1] else 'White' if AandB[0] > AandB[1] else 'Black')


pole = []
for i in range(8):
	pole += list(input())
w = pole.count('Q') * 9 + pole.count('R') * 5 + pole.count('B') * 3 + pole.count('N') * 3 + pole.count('P')
b = pole.count('q') * 9 + pole.count('r') * 5 + pole.count('b') * 3 + pole.count('n') * 3 + pole.count('p')
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


a = 'QRBPKN'
d = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
(s, k) = (0, 0)
for i in range(8):
	p = input()
	for i in p:
		if i in a:
			s += d[i]
		elif i in a.lower():
			k += d[i.upper()]
if s > k:
	print('White')
elif s < k:
	print('Black')
else:
	print('Draw')


C = 8
w_adv = 0
vals = {'.': 0, 'k': 0, 'p': 1, 'n': 3, 'b': 3, 'r': 5, 'q': 9}
for i in range(C):
	for c in list(input()):
		w_adv += vals[c.lower()] * (-1) ** c.islower()
if w_adv > 0:
	print('White')
elif w_adv == 0:
	print('Draw')
else:
	print('Black')


dicw = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
dicb = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
w = 0
b = 0
for i in range(8):
	s = input()
	for m in range(len(s)):
		if s[m] in dicw:
			w = w + dicw[s[m]]
		elif s[m] in dicb:
			b = b + dicb[s[m]]
		else:
			pass
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


score = 0
pts = {'Q': 9, 'q': -9, 'R': 5, 'r': -5, 'B': 3, 'b': -3, 'N': 3, 'n': -3, 'P': 1, 'p': -1, '.': 0, 'K': 0, 'k': 0}
for h in range(8):
	w = str(input())
	for ch in w:
		score += pts[ch]
if score > 0:
	print('White')
elif score < 0:
	print('Black')
else:
	print('Draw')


d_b = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
d_w = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
b = 0
w = 0
for _ in range(8):
	s = input()
	for c in s:
		if c in d_w:
			w += d_w[c]
		elif c in d_b:
			b += d_b[c]
if b > w:
	print('Black')
elif b < w:
	print('White')
else:
	print('Draw')


def val(c):
	a = 'qrbnp'
	b = [9, 5, 3, 3, 1]
	s = 1
	if 'a' <= c <= 'z':
		s = -1
	c = c.lower()
	t = a.find(c)
	if t == -1:
		s = 0
	return s * b[t]
ans = 0
for i in range(0, 8):
	s = input()
	for c in s:
		ans += val(c)
if ans == 0:
	print('Draw')
elif ans > 0:
	print('White')
else:
	print('Black')


arr = []
for i in range(8):
	string = str(input())
	arr.append(string)
white = 0
black = 0
for ele in arr:
	for k in ele:
		if k == 'Q':
			white += 9
		elif k == 'R':
			white += 5
		elif k == 'B':
			white += 3
		elif k == 'N':
			white += 3
		elif k == 'P':
			white += 1
		elif k == 'q':
			black += 9
		elif k == 'r':
			black += 5
		elif k == 'b':
			black += 3
		elif k == 'n':
			black += 3
		elif k == 'p':
			black += 1
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


white = 0
black = 0
j = 0
while j < 8:
	for i in list(input()):
		if i == 'Q':
			white += 9
		elif i == 'q':
			black += 9
		elif i == 'R':
			white += 5
		elif i == 'r':
			black += 5
		elif i == 'N' or i == 'B':
			white += 3
		elif i == 'n' or i == 'b':
			black += 3
		elif i == 'P':
			white += 1
		elif i == 'p':
			black += 1
		else:
			continue
	j += 1
if white < black:
	print('Black')
elif white > black:
	print('White')
else:
	print('Draw')


d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}

def type_value(i):
	if i.lower() not in d:
		return 0
	return d[i.lower()]
w = 0
b = 0
for _ in range(8):
	p = list(input())
	for piece in p:
		if piece.isupper():
			w += type_value(piece)
		elif piece.islower():
			b += type_value(piece)
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


white = 0
black = 0
for x in range(0, 8):
	y = input()
	for z in y:
		if z == 'Q':
			white += 9
		elif z == 'R':
			white += 5
		elif z == 'B':
			white += 3
		elif z == 'N':
			white += 3
		elif z == 'P':
			white += 1
		elif z == 'q':
			black += 9
		elif z == 'r':
			black += 5
		elif z == 'b':
			black += 3
		elif z == 'n':
			black += 3
		elif z == 'p':
			black += 1
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


b = []
f = 0
g = 0
for r in range(0, 8):
	c = input()
	for i in c:
		if i == 'Q':
			f = f + 9
		elif i == 'R':
			f += 5
		elif i == 'B':
			f += 3
		elif i == 'N':
			f += 3
		elif i == 'P':
			f += 1
		elif i == 'q':
			g += 9
		elif i == 'r':
			g += 5
		elif i == 'b':
			g += 3
		elif i == 'n':
			g += 3
		elif i == 'p':
			g += 1
if f == g:
	print('Draw')
elif f > g:
	print('White')
elif g > f:
	print('Black')


t = 8
score_b = {'p': 1, 'n': 3, 'b': 3, 'r': 5, 'q': 9}
score_w = {'P': 1, 'N': 3, 'B': 3, 'R': 5, 'Q': 9}
lines = ''
while t:
	lines += input()
	t = t - 1
t_b = 0
t_w = 0
for (j, k) in score_b.items():
	c = lines.count(j)
	t_b += c * k
for (j, k) in score_w.items():
	c = lines.count(j)
	t_w += c * k
if t_b > t_w:
	print('Black')
elif t_b < t_w:
	print('White')
else:
	print('Draw')


putih = 0
hitam = 0
from sys import stdin, stdout
for i in range(8):
	z = stdin.readline()
	for j in z:
		if j != '.':
			if j.isupper():
				if j == 'R':
					putih += 5
				elif j == 'B':
					putih += 3
				elif j == 'N':
					putih += 3
				elif j == 'P':
					putih += 1
				elif j == 'Q':
					putih += 9
			elif j == 'r':
				hitam += 5
			elif j == 'b':
				hitam += 3
			elif j == 'n':
				hitam += 3
			elif j == 'p':
				hitam += 1
			elif j == 'q':
				hitam += 9
		else:
			continue
if hitam == putih:
	print('Draw')
elif hitam > putih:
	print('Black')
else:
	print('White')


def main():
	W_piece = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
	B_piece = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
	pieces = ['Q', 'R', 'B', 'K', 'P', 'q', 'r', 'b', 'k', 'p']
	W = 0
	B = 0
	lines = []
	for i in range(8):
		line = input()
		lines.append(line)
	for line in lines:
		for p in range(len(line)):
			if line[p] in W_piece:
				W += W_piece[line[p]]
			if line[p] in B_piece:
				B += B_piece[line[p]]
	if W > B:
		print('White')
	elif B > W:
		print('Black')
	else:
		print('Draw')
main()


d = {'Q': 9, 'q': 9, 'R': 5, 'r': 5, 'B': 3, 'b': 3, 'N': 3, 'n': 3, 'P': 1, 'p': 1, 'K': 0, 'k': 0}
wi = 0
bl = 0
for i in range(8):
	a = input()
	for j in range(len(a)):
		if a[j] != '.':
			if a[j] <= 'Z':
				wi += d[a[j]]
			else:
				bl += d[a[j]]
if wi > bl:
	print('White')
elif bl > wi:
	print('Black')
else:
	print('Draw')


w = 0
b = 0
for j in range(8):
	s = input()
	for i in range(8):
		if s[i].islower() == True:
			if s[i] == 'q':
				b += 9
			elif s[i] == 'r':
				b += 5
			elif s[i] == 'b':
				b += 3
			elif s[i] == 'n':
				b += 3
			elif s[i] == 'p':
				b += 1
		elif s[i].islower() == False:
			if s[i] == 'Q':
				w += 9
			elif s[i] == 'R':
				w += 5
			elif s[i] == 'B':
				w += 3
			elif s[i] == 'N':
				w += 3
			elif s[i] == 'P':
				w += 1
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


white = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
black = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
white_weight = 0
black_weight = 0
for i in range(8):
	string = input()
	for j in string:
		if j in white:
			white_weight += white[j]
		if j in black:
			black_weight += black[j]
if white_weight == black_weight:
	print('Draw')
elif white_weight > black_weight:
	print('White')
else:
	print('Black')


def fun(c):
	if c == 'Q' or c == 'q':
		return 9
	if c == 'R' or c == 'r':
		return 5
	if c == 'B' or c == 'b':
		return 3
	if c == 'N' or c == 'n':
		return 3
	if c == 'P' or c == 'p':
		return 1
	if c == 'K' or c == 'k':
		return 0
white = 0
black = 0
for i in range(0, 8):
	s = input()
	for j in s:
		if ord(j) >= ord('a') and ord(j) <= ord('z'):
			white += fun(j)
		elif ord(j) >= ord('A') and ord(j) <= ord('Z'):
			black += fun(j)
if white > black:
	print('Black')
elif white == black:
	print('Draw')
else:
	print('White')


b = 0
w = 0
t = [9, 5, 3, 3, 1, 0]
e = ['q', 'r', 'b', 'n', 'p', 'k']
for i in range(8):
	a = input().split()
	a = ''.join(a)
	for j in a:
		for k in range(6):
			if j == e[k]:
				b += t[k]
			elif j == e[k].capitalize():
				w += t[k]
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


weight = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
(white_weight, black_weight) = (0, 0)
for _ in range(8):
	s = input()
	for x in s:
		if x.isupper():
			white_weight += weight.get(x.lower(), 0)
		else:
			black_weight += weight.get(x, 0)
if white_weight > black_weight:
	print('White')
elif white_weight < black_weight:
	print('Black')
else:
	print('Draw')


point_list = [('Q', 9), ('R', 5), ('B', 3), ('N', 3), ('P', 1)]
point_list = point_list + list(map(lambda x: (x[0].lower(), -x[1]), point_list))
point_dict = dict(point_list)
points = 0
try:
	while True:
		line = input()
		points += sum(map(lambda c: point_dict[c] if c in point_dict else 0, line))
except EOFError:
	pass
if points == 0:
	print('Draw')
elif points > 0:
	print('White')
else:
	print('Black')


values = (('Q', 9), ('R', 5), ('B', 3), ('N', 3), ('P', 1), ('K', 0))
valuesdict = {}
for (k, v) in values:
	valuesdict[k] = v
	valuesdict[k.lower()] = -v
valuesdict['.'] = 0
board = 0
for _ in range(8):
	row = input()
	board += sum([valuesdict[chr] for chr in row])
if board > 0:
	print('White')
elif board < 0:
	print('Black')
else:
	print('Draw')


board = list(input() + input() + input() + input() + input() + input() + input() + input())
w = 0
b = 0
w += 9 * board.count('Q')
w += 5 * board.count('R')
w += 3 * board.count('N')
w += 3 * board.count('B')
w += board.count('P')
b += 9 * board.count('q')
b += 5 * board.count('r')
b += 3 * board.count('n')
b += 3 * board.count('b')
b += board.count('p')
if w > b:
	print('White')
elif w == b:
	print('Draw')
else:
	print('Black')


r = dict()
sb = 0
sw = 0
r['Q'] = r['q'] = 9
r['B'] = r['b'] = 3
r['K'] = r['k'] = 0
r['N'] = r['n'] = 3
r['p'] = r['P'] = 1
r['R'] = r['r'] = 5
s1 = 'prqkbn'
s2 = s1.upper()
for i in range(8):
	t = input()
	for k in t:
		if k in s1:
			sb += r[k]
		elif k in s2:
			sw += r[k]
if sw == sb:
	print('Draw')
elif sw > sb:
	print('White')
else:
	print('Black')


def chess(lst):
	(white, black) = (0, 0)
	for i in range(8):
		for j in range(8):
			if lst[i][j] == 'Q':
				white += 9
			if lst[i][j] == 'R':
				white += 5
			if lst[i][j] == 'B':
				white += 3
			if lst[i][j] == 'N':
				white += 3
			if lst[i][j] == 'P':
				white += 1
			if lst[i][j] == 'q':
				black += 9
			if lst[i][j] == 'r':
				black += 5
			if lst[i][j] == 'b':
				black += 3
			if lst[i][j] == 'n':
				black += 3
			if lst[i][j] == 'p':
				black += 1
	if white > black:
		return 'White'
	elif white < black:
		return 'Black'
	return 'Draw'
a = list()
for i in range(8):
	s = input()
	a.append(list(s))
print(chess(a))


l = []
b = 0
w = 0
for _ in range(8):
	a = input()
	a1 = list(a)
	l = l + a1
for i in range(64):
	if l[i] == 'Q':
		w = w + 9
	elif l[i] == 'R':
		w = w + 5
	elif l[i] == 'B':
		w = w + 3
	elif l[i] == 'N':
		w = w + 3
	elif l[i] == 'P':
		w = w + 1
	elif l[i] == 'q':
		b = b + 9
	elif l[i] == 'r':
		b = b + 5
	elif l[i] == 'b':
		b = b + 3
	elif l[i] == 'n':
		b = b + 3
	elif l[i] == 'p':
		b = b + 1
if w > b:
	print('White')
elif w == b:
	print('Draw')
else:
	print('Black')


weight = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, '.': 0, 'k': 0}
board = []
for i in range(0, 8):
	board.append(input())
white = 0
black = 0
for l in board:
	for c in l:
		if c.islower():
			black += weight[c]
		else:
			white += weight[c.lower()]
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


board = [input() for i in range(8)]
all_pieces = []
for row in board:
	for coin in row:
		all_pieces.append(coin)
Black_weight = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
White_weight = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}

def totalWeight(color, all_pieces):
	weight = 0
	for i in color.keys():
		weight += all_pieces.count(i) * color[i]
	return weight
(Black, White) = (totalWeight(Black_weight, all_pieces), totalWeight(White_weight, all_pieces))
if Black > White:
	print('Black')
elif Black < White:
	print('White')
else:
	print('Draw')


p = ['Q', 'R', 'B', 'N', 'P', 'K']
v = [9, 5, 3, 3, 1, 0]
d = {}
for i in range(len(p)):
	d[p[i]] = v[i]
	d[p[i].lower()] = v[i]
d['.'] = 0
white = 0
black = 0
for i in range(8):
	line = input()
	for c in line:
		if c.isupper():
			white += d[c]
		else:
			black += d[c]
if white > black:
	print('White')
elif white == black:
	print('Draw')
else:
	print('Black')


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase
from fractions import *

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
white_weight = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
black_weight = {i.lower(): white_weight[i] for i in white_weight}
board = []
for i in range(8):
	board.append(input())
black = 0
white = 0
for i in board:
	for j in i:
		try:
			black += black_weight[j]
		except:
			pass
for i in board:
	for j in i:
		try:
			white += white_weight[j]
		except:
			pass
ans = 'Draw'
if white > black:
	ans = 'White'
elif black > white:
	ans = 'Black'
print(ans)


d = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, '.': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0}
ans = 0
for t in range(8):
	a = input()
	for i in range(8):
		ans += d[a[i]]
if ans > 0:
	print('White')
elif ans < 0:
	print('Black')
elif ans == 0:
	print('Draw')


c = ''
for i in range(8):
	c += input()
W = 21 * 8 - 9 * len(c.replace('Q', '')) - 5 * len(c.replace('R', '')) - 3 * len(c.replace('B', '')) - 3 * len(c.replace('N', '')) - len(c.replace('P', ''))
B = 21 * 8 - 9 * len(c.replace('q', '')) - 5 * len(c.replace('r', '')) - 3 * len(c.replace('b', '')) - 3 * len(c.replace('n', '')) - len(c.replace('p', ''))
if W > B:
	print('White')
elif W == B:
	print('Draw')
else:
	print('Black')


import string
WEIGHT = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}

def weight(c):
	x = c.upper()
	return WEIGHT[x]

def solve(board):
	s = ''.join(board)
	white = sum((weight(c) for c in s if c.isupper()))
	black = sum((weight(c) for c in s if c.islower()))
	if white > black:
		return 'White'
	elif white == black:
		return 'Draw'
	else:
		return 'Black'

def main():
	board = [input().strip() for _ in range(8)]
	assert len(board[0]) == 8
	result = solve(board)
	print(result)
main()


Niggas = 0
Racistas = 0
Fichas = ['Q', 'R', 'B', 'N', 'P']
PuntosFichas = [9, 5, 3, 3, 1]
for k in range(8):
	L = input()
	PuntosNiggas = 0
	PuntosRacistas = 0
	for k in L:
		for i in range(len(Fichas)):
			if k == Fichas[i]:
				PuntosRacistas += PuntosFichas[i]
			elif k == Fichas[i].lower():
				PuntosNiggas += PuntosFichas[i]
	Racistas += PuntosRacistas
	Niggas += PuntosNiggas
if Racistas > Niggas:
	print('White')
elif Racistas == Niggas:
	print('Draw')
else:
	print('Black')


count_whilte = 0
count_black = 0
for x in range(8):
	a = input()
	for y in a:
		if y.isupper():
			if y == 'Q':
				count_whilte += 9
			elif y == 'R':
				count_whilte += 5
			elif y == 'B':
				count_whilte += 3
			elif y == 'N':
				count_whilte += 3
			elif y == 'P':
				count_whilte += 1
			else:
				pass
		elif y.islower():
			if y == 'q':
				count_black += 9
			elif y == 'r':
				count_black += 5
			elif y == 'b':
				count_black += 3
			elif y == 'n':
				count_black += 3
			elif y == 'p':
				count_black += 1
			else:
				pass
m = max(count_black, count_whilte)
if count_whilte == count_black:
	print('Draw')
elif m == count_black:
	print('Black')
elif m == count_whilte:
	print('White')


chess = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
white = 'QRBNP'
black = 'qrbnp'
w = b = 0
for i in range(8):
	for j in input():
		if j in white:
			w += chess[j]
		elif j in black:
			b += chess[j.upper()]
if w > b:
	print('White')
elif w == b:
	print('Draw')
else:
	print('Black')


def solution():
	scores = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
	sum_a = 0
	sum_b = 0
	grid = []
	for i in range(8):
		row = input()
		if row == '........':
			pass
		else:
			grid.append(row)
	for j in range(len(grid)):
		for i in grid[j]:
			if i == '.':
				pass
			elif i.isupper():
				sum_a += scores[i]
			else:
				sum_b += scores[i.upper()]
	if sum_a > sum_b:
		return print('White')
	elif sum_a < sum_b:
		return print('Black')
	return print('Draw')
solution()


w = 0
b = 0
WHITE = 'QBNRP'
BLACK = 'qbnrp'
wvals = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
bvals = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
for line in range(8):
	chars = list(input())
	for char in chars:
		if char in WHITE:
			w += wvals[char]
		elif char in BLACK:
			b += bvals[char]
print('White' if w > b else 'Black' if w != b else 'Draw')


v = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'K': 0, 'k': 0}
(b, W) = (0, 0)
for i in range(8):
	l = input()
	for c in l:
		if c.isupper() is True:
			W += v[c]
		elif c.islower() is True:
			b += v[c]
if b > W:
	print('Black')
elif W > b:
	print('White')
else:
	print('Draw')


board = []
dictionary = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(white, black) = (0, 0)
for i in range(8):
	for j in list(input()):
		if j != '.' and j.upper() == j:
			white += dictionary[j.lower()]
		elif j != '.':
			black += dictionary[j]
print('White' if white > black else 'Draw' if white == black else 'Black')


white = 0
black = 0
w = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
for x in range(8):
	s = input()
	for c in s:
		if c.islower():
			black += w[c.lower()]
		elif c.isupper():
			white += w[c.lower()]
print('White' if white > black else 'Black' if black > white else 'Draw')


(p, P) = 'pP'
m = {'n': p * 3, 'b': p * 3, 'r': p * 5, 'q': p * 9, 'N': P * 3, 'B': P * 3, 'R': P * 5, 'Q': P * 9}
import sys
s = sys.stdin.read()
for k in m:
	s = s.replace(k, m[k])
(w, b) = (s.count('P'), s.count('p'))
print('White' if w > b else 'Black' if w < b else 'Draw')


desc = []
for i in range(8):
	input_str = input()
	desc.append(input_str)
(w, b) = (0, 0)
for i in range(8):
	for j in range(8):
		if desc[i][j] == 'Q':
			w += 9
		elif desc[i][j] == 'q':
			b += 9
		elif desc[i][j] == 'R':
			w += 5
		elif desc[i][j] == 'r':
			b += 5
		elif desc[i][j] == 'B':
			w += 3
		elif desc[i][j] == 'b':
			b += 3
		elif desc[i][j] == 'N':
			w += 3
		elif desc[i][j] == 'n':
			b += 3
		elif desc[i][j] == 'P':
			w += 1
		elif desc[i][j] == 'p':
			b += 1
		else:
			pass
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


li = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
sum = 0
sum1 = 0
for i in range(8):
	k = input()
	for j in k:
		if 'j' == '.':
			continue
		if j.islower():
			sum = sum + li[str(j)]
		else:
			j = j.lower()
			sum1 = sum1 + li[str(j)]
if sum > sum1:
	print('Black')
elif sum < sum1:
	print('White')
else:
	print('Draw')


a = ['q', 'r', 'b', 'n', 'p', 'k']
s = [9, 5, 3, 3, 1, 0]
white = 0
black = 0
for _ in range(8):
	z = input()
	for i in range(6):
		if a[i] in z:
			black += s[i] * z.count(a[i])
		if a[i].upper() in z:
			white += s[i] * z.count(a[i].upper())
if white > black:
	print('White')
elif white == black:
	print('Draw')
else:
	print('Black')


import sys
w = 0
d = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0, '.': 0}
for i in range(8):
	s = input().strip()
	for c in s:
		w += d[c]
if w > 0:
	print('White')
elif w == 0:
	print('Draw')
else:
	print('Black')


weight = 0
w_dict = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
for i in range(8):
	s = input()
	for c in s:
		if c.islower():
			weight += w_dict[c]
		elif c.isupper():
			weight -= w_dict[c.lower()]
if weight < 0:
	print('White')
elif weight == 0:
	print('Draw')
else:
	print('Black')


x = [[j for j in input() if j != '.'] for i in range(8)]
c = dict.fromkeys(['q', 'r', 'b', 'n', 'p', 'k', 'Q', 'R', 'B', 'N', 'P', 'K'], 0)
k = {}
k['Q'] = 9
k['q'] = 9
k['r'] = 5
k['R'] = 5
k['b'] = 3
k['B'] = 3
k['n'] = 3
k['N'] = 3
k['K'] = 3
k['p'] = 1
k['P'] = 1
k['k'] = 0
k['K'] = 0
w = 0
b = 0
for i in x:
	for j in i:
		c[j] += 1
for i in ['q', 'r', 'b', 'n', 'p', 'k', 'Q', 'R', 'B', 'N', 'P', 'K']:
	if i in ['q', 'r', 'b', 'n', 'p', 'k']:
		b += c[i] * k[i]
	else:
		w += c[i] * k[i]
if w < b:
	print('Black')
elif w > b:
	print('White')
else:
	print('Draw')


a = str()
for _ in range(8):
	a = a + input()
n = b = w = int(0)
while n < 64:
	if a[n] == 'q':
		b = b + 9
	elif a[n] == 'r':
		b = b + 5
	elif a[n] == 'b':
		b = b + 3
	elif a[n] == 'n':
		b = b + 3
	elif a[n] == 'p':
		b = b + 1
	elif a[n] == 'Q':
		w = w + 9
	elif a[n] == 'R':
		w = w + 5
	elif a[n] == 'N':
		w = w + 3
	elif a[n] == 'B':
		w = w + 3
	elif a[n] == 'P':
		w = w + 1
	n = n + 1
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


T_ON = 0
DEBUG_ON = 1
MOD = 998244353

def solve():
	G = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
	white = 0
	black = 0
	for i in range(8):
		for c in input():
			w = G.get(c.lower(), 0)
			if c.isupper():
				white += w
			else:
				black += w
	if white > black:
		print('White')
	elif white < black:
		print('Black')
	else:
		print('Draw')

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def debug(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
import math
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split()))

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def First():
	print('First')

def Second():
	print('Second')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

def fib_to_n(n):
	f = []
	(a, b) = (0, 1)
	while a <= n:
		f.append(a)
		(a, b) = (b, a + b)
	return f

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def lcm(a, b):
	d = gcd(a, b)
	return a * b // d

def is_even(x):
	return x % 2 == 0

def is_odd(x):
	return x % 2 == 1

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i:
			return False
	return True

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P

def is_lucky(n):
	return set(list(str(n))).issubset({'4', '7'})
main()


A = 'QRBNPK'
a = 'qrbnpk'
h = [9, 5, 3, 3, 1, 0]
black = 0
white = 0
for i in range(8):
	s = input()
	for j in range(6):
		k = h[j] * s.count(a[j])
		l = h[j] * s.count(A[j])
		black += k
		white += l
if black > white:
	print('Black')
elif white > black:
	print('White')
else:
	print('Draw')


bl = 0
wh = 0
for i in range(8):
	s = str(input())
	for x in range(8):
		if s[x] == 'Q':
			wh += 9
		elif s[x] == 'R':
			wh += 5
		elif s[x] == 'B':
			wh += 3
		elif s[x] == 'N':
			wh += 3
		elif s[x] == 'P':
			wh += 1
		elif s[x] == 'q':
			bl += 9
		elif s[x] == 'r':
			bl += 5
		elif s[x] == 'b':
			bl += 3
		elif s[x] == 'n':
			bl += 3
		elif s[x] == 'p':
			bl += 1
if bl > wh:
	print('Black')
elif bl == wh:
	print('Draw')
else:
	print('White')


def get_it(desk):
	figures = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
	white = black = 0
	for line in desk:
		for char in line:
			if char.isalpha() and char.lower() in figures:
				if char.islower():
					black += figures[char]
				else:
					white += figures[char.lower()]
	return 'White' if white > black else 'Black' if white < black else 'Draw'
desk = '\n'.join([input() for i in range(8)])
print(get_it(desk))


import sys
w = 0
b = 0
for i in range(8):
	n = list(sys.stdin.readline())
	for j in n:
		if j == 'q':
			w = w + 9
		if j == 'Q':
			b = b + 9
		if j == 'r':
			w = w + 5
		if j == 'R':
			b = b + 5
		if j == 'b':
			w = w + 3
		if j == 'B':
			b = b + 3
		if j == 'n':
			w = w + 3
		if j == 'N':
			b = b + 3
		if j == 'p':
			w = w + 1
		if j == 'P':
			b = b + 1
if w < b:
	print('White')
elif w > b:
	print('Black')
else:
	print('Draw')


table = [input() for i in range(8)]
white = 'QRBNP qrbnp.kK'
black = 'qrbnp QRBNP.kK'
mass = [9, 5, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
wn = 0
bn = 0
for i in range(8):
	for j in range(8):
		wn += mass[white.find(table[i][j])]
		bn += mass[black.find(table[i][j])]
if wn > bn:
	print('White')
elif wn < bn:
	print('Black')
else:
	print('Draw')


def chess():
	d = dict(q=9, Q=-9, r=5, R=-5, b=3, B=-3, n=3, N=-3, p=1, P=-1)
	ans = 0
	for i in range(8):
		for j in input():
			if j in d:
				ans += d[j]
	return ['Draw', 'Black', 'White'][(ans > 0) - (ans < 0)]
print(chess())


def m(i):
	if i == 'q':
		return 9
	elif i == 'r':
		return 5
	elif i == 'b' or i == 'n':
		return 3
	elif i == 'p':
		return 1
	else:
		return 0
(s, d) = (0, 0)
for _ in range(8):
	a = input()
	for i in a:
		if i.isalpha():
			if i.isupper():
				z = i.lower()
				s += m(z)
			else:
				d += m(i)
if s > d:
	print('White')
elif d > s:
	print('Black')
else:
	print('Draw')


v = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, '.': 0, 'K': 0}
b = [input() for i in range(8)]
w = 0
bl = 0
for line in b:
	for c in line:
		if ord('a') <= ord(c) <= ord('z'):
			w += v[c.upper()]
		else:
			bl += v[c]
if bl < w:
	print('Black')
elif bl > w:
	print('White')
else:
	print('Draw')


l = []
for i in range(8):
	s = input()
	l1 = list(s)
	l.append(l1)
white = 0
black = 0
for i in range(8):
	for j in range(8):
		if l[i][j] == 'Q':
			white += 9
		if l[i][j] == 'q':
			black += 9
		if l[i][j] == 'R':
			white += 5
		if l[i][j] == 'r':
			black += 5
		if l[i][j] == 'B':
			white += 3
		if l[i][j] == 'b':
			black += 3
		if l[i][j] == 'N':
			white += 3
		if l[i][j] == 'n':
			black += 3
		if l[i][j] == 'P':
			white += 1
		if l[i][j] == 'p':
			black += 1
if white > black:
	print('White')
elif white == black:
	print('Draw')
else:
	print('Black')


mylist = []
blacklist = ['k', 'p', '-', 'n', '-', 'r', '-', '-', '-', 'q']
whitelist = ['K', 'P', '-', 'N', '-', 'R', '-', '-', '-', 'Q']
(black, white) = (0, 0)
for i in range(0, 8):
	mylist.append(list(input()))
for i in range(0, 8):
	for j in range(0, 8):
		if mylist[i][j].isalpha():
			if mylist[i][j] == 'b':
				mylist[i][j] = 'n'
			if mylist[i][j] == 'B':
				mylist[i][j] = 'N'
			if mylist[i][j].islower():
				black += blacklist.index(mylist[i][j])
			if mylist[i][j].isupper():
				white += whitelist.index(mylist[i][j])
if white > black:
	print('White')
if white == black:
	print('Draw')
if white < black:
	print('Black')


arr = [input() for _ in range(8)]
w = 0
b = 0
d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
for i in range(8):
	for j in range(8):
		if arr[i][j].isupper() and arr[i][j] != 'K':
			w += d[arr[i][j].lower()]
		if arr[i][j].islower() and arr[i][j] != 'k':
			b += d[arr[i][j]]
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


weight = 0
n = 8
pieces = 'qrbnp'
weights = [9, 5, 3, 3, 1]
i = 0
while i < n:
	y = list(input())
	for x in y:
		if x in pieces.upper():
			weight += weights[list(pieces.upper()).index(x)]
		elif x in pieces.lower():
			weight -= weights[list(pieces).index(x)]
	i += 1
if weight < 0:
	print('Black')
elif weight > 0:
	print('White')
else:
	print('Draw')


cost = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, '.': 0}
line = ''.join((input() for i in range(8)))
c1 = c2 = 0
for c in line:
	if c.isupper():
		c1 += cost[c]
	else:
		c2 += cost[c.upper()]
print('White' if c1 > c2 else 'Black' if c1 < c2 else 'Draw')


field = [''] * 8
for i in range(8):
	field[i] = input()
score1 = 0
score2 = 0
for i in range(8):
	for j in range(8):
		if field[i][j] == 'Q':
			score1 += 9
		if field[i][j] == 'B':
			score1 += 3
		if field[i][j] == 'N':
			score1 += 3
		if field[i][j] == 'R':
			score1 += 5
		if field[i][j] == 'K':
			score1 += 0
		if field[i][j] == 'P':
			score1 += 1
		if field[i][j] == 'q':
			score2 += 9
		if field[i][j] == 'b':
			score2 += 3
		if field[i][j] == 'n':
			score2 += 3
		if field[i][j] == 'r':
			score2 += 5
		if field[i][j] == 'k':
			score2 += 0
		if field[i][j] == 'p':
			score2 += 1
if score1 > score2:
	print('White')
elif score2 > score1:
	print('Black')
else:
	print('Draw')


s = 0
z = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0, '.': 0}
for i in range(8):
	a = input()
	for j in a:
		s = s + z[j]
if s > 0:
	print('White')
if s < 0:
	print('Black')
if s == 0:
	print('Draw')


string = ''
for i in range(8):
	string += input()
ans = 0
dict = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1}
for i in string:
	if i == '.' or i == 'K' or i == 'k':
		continue
	ans += dict[i]
if ans > 0:
	print('White')
elif ans == 0:
	print('Draw')
else:
	print('Black')


import sys
import math
import bisect

def main():
	x = 0
	y = 0
	for i in range(8):
		s = input()
		for ch in s:
			if ch == 'Q':
				x += 9
			elif ch == 'R':
				x += 5
			elif ch == 'B':
				x += 3
			elif ch == 'N':
				x += 3
			elif ch == 'P':
				x += 1
			elif ch == 'K':
				pass
			elif ch == 'q':
				y += 9
			elif ch == 'r':
				y += 5
			elif ch == 'b':
				y += 3
			elif ch == 'n':
				y += 3
			elif ch == 'p':
				y += 1
			elif ch == 'k':
				pass
	if x == y:
		print('Draw')
	elif x > y:
		print('White')
	else:
		print('Black')
main()


whiteWeight = blackWeight = 0
whitePieces = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
blackPieces = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
for i in range(8):
	x = list(input())
	for y in x:
		if y in whitePieces:
			whiteWeight += whitePieces[y]
		elif y in blackPieces:
			blackWeight += blackPieces[y]
if whiteWeight > blackWeight:
	print('White')
elif whiteWeight < blackWeight:
	print('Black')
else:
	print('Draw')


LL = 'Q9R5B3N3P1K0'
ll = 'q9r5b3n3p1k0'
tt = []
black = 0
white = 0
for i in range(8):
	tt.append(input().strip())
for i in range(8):
	for j in range(8):
		if tt[i][j] != '.':
			if tt[i][j] in LL:
				white = white + int(LL[LL.find(tt[i][j]) + 1])
			else:
				black = black + int(ll[ll.find(tt[i][j]) + 1])
if black > white:
	print('Black')
elif black < white:
	print('White')
else:
	print('Draw')


def get_figures_weights():
	figures = {}
	figures['q'] = 9
	figures['r'] = 5
	figures['b'] = 3
	figures['n'] = 3
	figures['p'] = 1
	figures['k'] = 0
	figures['.'] = 0
	return figures

def main():
	white_weight = 0
	black_weight = 0
	figures = get_figures_weights()
	for i in range(8):
		line = input()
		for symbol in list(line):
			if symbol.islower():
				black_weight += figures[symbol]
			else:
				white_weight += figures[symbol.lower()]
	if white_weight == black_weight:
		print('Draw')
	elif white_weight > black_weight:
		print('White')
	else:
		print('Black')
main()


v = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
(a, b) = (0, 0)
for i in range(8):
	for j in input():
		if j.isupper():
			a += v[j.lower()]
		else:
			b += v[j]
if a > b:
	print('White')
elif b > a:
	print('Black')
else:
	print('Draw')


t = 'qrbnp'
m = 'QRBNP'
a = [9, 5, 3, 3, 1]
k = 0
l = 0
for z in range(8):
	s = input()
	for i in range(5):
		k += a[i] * s.count(t[i])
	for i in range(5):
		l += a[i] * s.count(m[i])
if k == l:
	print('Draw')
elif k > l:
	print('Black')
else:
	print('White')


a = ''
for i in range(8):
	a = a + input()
m = 9 * a.count('Q') + 5 * a.count('R') + 3 * (a.count('B') + a.count('N')) + a.count('P')
n = 9 * a.count('q') + 5 * a.count('r') + 3 * (a.count('b') + a.count('n')) + a.count('p')
if m > n:
	print('White')
elif m < n:
	print('Black')
else:
	print('Draw')


(white, black) = ({'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}, {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1})
(white_sum, black_sum, l) = (0, 0, [])

def f(x):
	if x == '.' or x == 'K' or x == 'k':
		return False
	else:
		return True
for x in range(8):
	l.extend(filter(f, input()))
for num in l:
	if num in white:
		white_sum += white[num]
	else:
		black_sum += black[num]
if white_sum > black_sum:
	print('White')
elif black_sum > white_sum:
	print('Black')
else:
	print('Draw')


dic1 = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
dic2 = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
(res1, res2) = (0, 0)
for i in range(8):
	s = str(input())
	for j in s:
		if j.islower() and j in dic1:
			res1 += dic1[j]
		if j.isupper() and j in dic2:
			res2 += dic2[j]
print('Black' if res1 > res2 else 'White' if res1 < res2 else 'Draw')


r1 = tuple(input())
r2 = tuple(input())
r3 = tuple(input())
r4 = tuple(input())
r5 = tuple(input())
r6 = tuple(input())
r7 = tuple(input())
r8 = tuple(input())
r = r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8
countW = 0
countB = 0
for x in range(64):
	if r[x] == 'q':
		countB += 9
	elif r[x] == 'r':
		countB += 5
	elif r[x] == 'b':
		countB += 3
	elif r[x] == 'n':
		countB += 3
	elif r[x] == 'p':
		countB += 1
	elif r[x] == 'Q':
		countW += 9
	elif r[x] == 'R':
		countW += 5
	elif r[x] == 'B':
		countW += 3
	elif r[x] == 'N':
		countW += 3
	elif r[x] == 'P':
		countW += 1
if countW > countB:
	print('White')
elif countW == countB:
	print('Draw')
else:
	print('Black')


d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
b = 0
w = 0
for _ in range(8):
	temp = input()
	for i in temp:
		if i != '.':
			if i.islower():
				b += d[i.lower()]
			else:
				w += d[i.lower()]
if b == w:
	print('Draw')
elif b > w:
	print('Black')
else:
	print('White')


a = []
W = 0
B = 0
for i in range(8):
	s = input()
	s = list(filter(lambda x: x != '.', s))
	for j in range(len(s)):
		a.append(s[j])
for i in range(len(a)):
	if a[i] == 'Q':
		W = W + 9
	if a[i] == 'R':
		W = W + 5
	if a[i] == 'B':
		W = W + 3
	if a[i] == 'N':
		W = W + 3
	if a[i] == 'P':
		W = W + 1
	if a[i] == 'q':
		B = B + 9
	if a[i] == 'r':
		B = B + 5
	if a[i] == 'b':
		B = B + 3
	if a[i] == 'n':
		B = B + 3
	if a[i] == 'p':
		B = B + 1
if B > W:
	print('Black')
if B < W:
	print('White')
if B == W:
	print('Draw')


def switch(arg):
	switcher = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
	return switcher.get(arg, 0)
a = []
for i in range(8):
	a.append(input())
sum_black = 0
sum_white = 0
for i in range(8):
	for elem in a[i]:
		if elem.islower():
			sum_black += switch(elem)
		else:
			sum_white += switch(elem.lower())
if sum_white > sum_black:
	print('White')
elif sum_black > sum_white:
	print('Black')
else:
	print('Draw')


i = 0
j = 0
weightmap = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0, '.': 0}
totalScore = 0
while i < 8:
	place = input()
	j = 0
	while j < 8:
		totalScore = totalScore + weightmap[place[j]]
		j = j + 1
	i = i + 1
if totalScore > 0:
	print('White')
elif totalScore < 0:
	print('Black')
else:
	print('Draw')


l = []
b = 0
w = 0
for i in range(8):
	x = input()
	l.append(x)
W = {'Q': 9, 'R': 5, 'B': 3, 'P': 1, 'N': 3}
B = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
for i in range(8):
	s = l[i]
	for j in range(8):
		if s[j] in B:
			b = b + B[s[j]]
		elif s[j] in W:
			w = w + W[s[j]]
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


str = ''
for _ in range(8):
	str += input()
scores = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
b = ['q', 'r', 'b', 'n', 'p', 'k']
w = ['Q', 'R', 'B', 'N', 'P', 'K']
ws = bs = 0
for c in str:
	if c in b:
		bs += scores[c]
	elif c in w:
		ws += scores[c.lower()]
if ws > bs:
	print('White')
elif bs > ws:
	print('Black')
else:
	print('Draw')


d = ['Q', 'R', 'B', 'N', 'P', 'K', 9, 5, 3, 3, 1, 0]
d1 = ['q', 'r', 'b', 'n', 'p', 'k', 9, 5, 3, 3, 1, 0]
a = []
for i in range(8):
	t = input()
	for j in t:
		a.append(j)
(s, s1) = (0, 0)
for i in a:
	for j in range(len(d) - 6):
		if i == d[j]:
			s = s + d[j + 6]
	for j in range(len(d1) - 6):
		if i == d1[j]:
			s1 = s1 + d1[j + 6]
if s > s1:
	print('White')
elif s1 > s:
	print('Black')
else:
	print('Draw')


weight = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1}
balance = sum((weight[ch] for _ in range(8) for ch in input() if ch in weight))
print({balance > 0: 'White', balance == 0: 'Draw', balance < 0: 'Black'}[True])


w = dict()
b = dict()
w['Q'] = 9
w['R'] = 5
w['B'] = 3
w['N'] = 3
w['P'] = 1
b['q'] = 9
b['r'] = 5
b['b'] = 3
b['n'] = 3
b['p'] = 1
n = 8
m = 8
white = 0
black = 0
for i in range(n):
	s = input()
	for i in s:
		if i in w:
			white += w[i]
		if i in b:
			black += b[i]
if white > black:
	print('White')
if black > white:
	print('Black')
if white == black:
	print('Draw')


a = dict(Q=9, q=-9, R=5, r=-5, B=3, b=-3, N=3, n=-3, P=1, p=-1, K=0, k=0)
wei = 0
for _ in range(8):
	for i in input():
		if i != '.':
			wei += a[i]
if wei < 0:
	print('Black')
elif wei > 0:
	print('White')
else:
	print('Draw')


white = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
black = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
white_score = black_score = 0
for i in range(8):
	line = input()
	for j in range(8):
		if line[j] in black:
			black_score += black[line[j]]
		elif line[j] in white:
			white_score += white[line[j]]
if black_score > white_score:
	print('Black')
elif white_score > black_score:
	print('White')
else:
	print('Draw')


chess_pieces = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
white = 0
black = 0
for _ in range(8):
	for line in input():
		rmn = line.replace('.', '')
		for chess in rmn:
			try:
				white += chess_pieces[chess]
			except KeyError:
				black += chess_pieces[chess.upper()]
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


def main():
	bw = [0, 0]
	for _ in range(8):
		for c in input():
			if c.isalpha():
				bw[c.isupper()] += {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}[c.upper()]
	if bw[0] < bw[1]:
		print('White')
	elif bw[0] > bw[1]:
		print('Black')
	else:
		print('Draw')
main()


def chess(arr):
	vals = {'Q': 9, 'R': 5, 'N': 3, 'B': 3, 'P': 1, 'K': 0, 'q': -9, 'r': -5, 'n': -3, 'b': -3, 'p': -1, 'k': -0, '.': 0}
	sum = 0
	for row in arr:
		for col in row:
			sum += vals[col]
	if sum > 0:
		return 'White'
	elif sum < 0:
		return 'Black'
	else:
		return 'Draw'
arr = []
for i in range(8):
	row = input()
	arr.append([j for j in row])
print(chess(arr))


conv = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
s = ''.join([input() for _ in range(8)])
(a, b) = (sum([conv.get(c, 0) for c in s if c.islower()]), sum([conv.get(c, 0) for c in s if c.isupper()]))
print('Draw' if a == b else 'White' if a < b else 'Black')


whitenum = 0
blacknum = 0
for i in range(8):
	row = input()
	for ch in row:
		if ch == 'q':
			blacknum = blacknum + 9
		if ch == 'r':
			blacknum = blacknum + 5
		if ch == 'b' or ch == 'n':
			blacknum = blacknum + 3
		if ch == 'p':
			blacknum = blacknum + 1
		if ch == 'Q':
			whitenum = whitenum + 9
		if ch == 'R':
			whitenum = whitenum + 5
		if ch == 'B' or ch == 'N':
			whitenum = whitenum + 3
		if ch == 'P':
			whitenum = whitenum + 1
if whitenum == blacknum:
	print('Draw')
elif whitenum > blacknum:
	print('White')
else:
	print('Black')


from typing import List

def parse_input() -> List[str]:
	return [input() for _ in range(8)]

def solve(board: List[str]) -> str:
	rank = {'r': 5, 'b': 3, 'n': 3, 'q': 9, 'p': 1}
	net_rank = 0
	for row in board:
		for char in row:
			is_white = char == char.upper()
			is_piece = char.lower() in rank
			if is_piece and is_white:
				net_rank += rank[char.lower()]
			elif is_piece and (not is_white):
				net_rank -= rank[char.lower()]
	if net_rank == 0:
		return 'Draw'
	if net_rank > 0:
		return 'White'
	return 'Black'
print(solve(parse_input()))


cost = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
players = [0, 0]
for _ in range(8):
	for c in input():
		players[c.isupper()] += cost.get(c.lower(), 0)
if players[0] > players[1]:
	print('Black')
elif players[0] == players[1]:
	print('Draw')
else:
	print('White')


s = ''
(x, y) = (0, 0)
a = [['q', 9], ['r', 5], ['b', 3], ['n', 3], ['p', 1]]
for i in range(8):
	s += str(input())
for i in a:
	x += s.count(i[0]) * i[1]
	y += s.count(i[0].upper()) * i[1]
if x > y:
	print('Black')
elif x < y:
	print('White')
else:
	print('Draw')


W = 0
w = 0
for i in range(8):
	l1 = input()
	for j in range(8):
		if l1[j] == 'q':
			w += 9
		if l1[j] == 'r':
			w += 5
		if l1[j] == 'b' or l1[j] == 'n':
			w += 3
		if l1[j] == 'p':
			w += 1
		if l1[j] == 'Q':
			W += 9
		if l1[j] == 'R':
			W += 5
		if l1[j] == 'B' or l1[j] == 'N':
			W += 3
		if l1[j] == 'P':
			W += 1
if W > w:
	print('White')
if w > W:
	print('Black')
if w == W:
	print('Draw')


w = 0
b = 0
weight = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, '.': 0}
for i in range(0, 8):
	position = list(input())
	for j in range(0, len(position)):
		if position[j] in weight:
			w += weight[position[j]]
		else:
			b += weight[position[j].upper()]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


import math
import sys
w = 0
b = 0
for i in range(0, 8):
	s = input()
	for j in s:
		if j == 'Q':
			w += 9
		if j == 'R':
			w += 5
		if j == 'B':
			w += 3
		if j == 'N':
			w += 3
		if j == 'P':
			w += 1
		if j == 'q':
			b += 9
		if j == 'r':
			b += 5
		if j == 'b':
			b += 3
		if j == 'n':
			b += 3
		if j == 'p':
			b += 1
if b == w:
	print('Draw')
if b > w:
	print('Black')
if w > b:
	print('White')


black_piece2weight = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
white_piece2weight = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
num_rows_chessboard = 8
white_weight = black_weight = 0
for i in range(num_rows_chessboard):
	row = input().strip()
	for sq in row:
		if sq in white_piece2weight:
			white_weight += white_piece2weight[sq]
		elif sq in black_piece2weight:
			black_weight += black_piece2weight[sq]
if white_weight > black_weight:
	output = 'White'
elif white_weight < black_weight:
	output = 'Black'
else:
	output = 'Draw'
print(output)


white = 0
black = 0
for line in range(8):
	string = input()
	for ch in string:
		if ch == ch.lower():
			if ch == 'q':
				black += 9
			elif ch == 'r':
				black += 5
			elif ch == 'b':
				black += 3
			elif ch == 'n':
				black += 3
			elif ch == 'p':
				black += 1
		elif ch == 'Q':
			white += 9
		elif ch == 'R':
			white += 5
		elif ch == 'B':
			white += 3
		elif ch == 'N':
			white += 3
		elif ch == 'P':
			white += 1
if white > black:
	print('White')
elif white == black:
	print('Draw')
else:
	print('Black')


__author__ = 'catman'
Points = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
white = 0
black = 0
for i in range(8):
	line = input()
	for j in range(len(line)):
		if line[j] == '.' or line[j] == 'K' or line[j] == 'k':
			continue
		elif line[j] == 'Q' or line[j] == 'R' or line[j] == 'B' or (line[j] == 'N') or (line[j] == 'P'):
			isWhite = True
		else:
			isWhite = False
		if isWhite:
			white += Points[line[j]]
		else:
			ch = chr(ord(line[j]) - 32)
			black += Points[ch]
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


white = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
black = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
bla = 0
whi = 0
for i in range(8):
	x = input()
	for j in x:
		if j in white:
			whi += white[j]
		elif j in black:
			bla += black[j]
if whi > bla:
	print('White')
elif whi < bla:
	print('Black')
else:
	print('Draw')


total_black = 0
total_white = 0
black = {'q': 0, 'r': 0, 'b': 0, 'n': 0, 'p': 0, 'k': 0}
white = {'q': 0, 'r': 0, 'b': 0, 'n': 0, 'p': 0, 'k': 0}
weight = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
for i in range(8):
	str = input()
	for j in range(8):
		if str[j] != '.':
			if str[j] == str[j].lower():
				black[str[j]] += 1
			else:
				white[str[j].lower()] += 1
for key in black:
	total_black += black[key] * weight[key]
	total_white += white[key] * weight[key]
if total_white == total_black:
	print('Draw')
elif total_white > total_black:
	print('White')
else:
	print('Black')


lista = []
for i in range(8):
	lista.append(list(input()))
ansWhite = 0
ansBlack = 0
letters = ['Q', 'R', 'B', 'N', 'P', 'K', 'q', 'r', 'b', 'n', 'p', 'k']
nums = [9, 5, 3, 3, 1, 0, 9, 5, 3, 3, 1, 0]
for i in range(8):
	for j in range(8):
		if lista[i][j] in letters:
			if letters.index(lista[i][j]) > 5:
				ansWhite += nums[letters.index(lista[i][j])]
			else:
				ansBlack += nums[letters.index(lista[i][j])]
if ansWhite > ansBlack:
	print('Black')
elif ansWhite < ansBlack:
	print('White')
else:
	print('Draw')


from sys import stdin, stdout
white_weight = 0
black_weight = 0
weights = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
chess_row = stdin.readline().strip()
while chess_row:
	for pos in chess_row:
		if pos.isalpha():
			if pos.isupper():
				white_weight += weights[pos.lower()]
			else:
				black_weight += weights[pos]
	chess_row = stdin.readline().strip()
if white_weight == black_weight:
	stdout.write('Draw')
elif white_weight < black_weight:
	stdout.write('Black')
else:
	stdout.write('White')


n = 8
white = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
black = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
sum_white = 0
sum_black = 0
while n > 0:
	line = str(input())
	for symbol in line:
		if symbol in white:
			sum_white += white[symbol]
		if symbol in black:
			sum_black += black[symbol]
	n -= 1
if sum_white > sum_black:
	print('White')
elif sum_white == sum_black:
	print('Draw')
else:
	print('Black')


w = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
b = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
wn = 0
bn = 0
for i in range(8):
	z = list(input())
	for q in z:
		if q in w:
			wn += w[q]
		if q in b:
			bn += b[q]
if wn > bn:
	print('White')
elif bn > wn:
	print('Black')
else:
	print('Draw')


desk = [list(input()) for i in range(8)]
C = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
p1 = 0
p2 = 0
for x in desk:
	for x2 in x:
		if x2.isupper():
			p2 += C[x2.lower()]
		else:
			p1 += C[x2]
if p1 == p2:
	print('Draw')
else:
	print('White' if p2 > p1 else 'Black')


board = [[str(x) for x in input().strip()] for x in range(8)]
white = 0
black = 0
for x in range(8):
	for y in range(8):
		if board[x][y] is '.':
			continue
		elif board[x][y] is 'Q':
			white += 9
		elif board[x][y] is 'q':
			black += 9
		elif board[x][y] is 'R':
			white += 5
		elif board[x][y] is 'r':
			black += 5
		elif board[x][y] is 'B' or board[x][y] is 'N':
			white += 3
		elif board[x][y] is 'b' or board[x][y] is 'n':
			black += 3
		elif board[x][y] is 'P':
			white += 1
		elif board[x][y] is 'p':
			black += 1
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


line = []
t = 0
while t < 8:
	line = line + list(input())
	t = t + 1
white = line.count('Q') * 9 + line.count('R') * 5 + line.count('B') * 3 + line.count('N') * 3 + line.count('P')
black = line.count('q') * 9 + line.count('r') * 5 + line.count('b') * 3 + line.count('n') * 3 + line.count('p')
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


from sys import stdin
vals = {'Q': 9, 'q': -9, 'R': 5, 'r': -5, 'B': 3, 'b': -3, 'N': 3, 'n': -3, 'P': 1, 'p': -1}
weight = 0
data = stdin.readlines()
for line in data:
	for ch in line:
		weight += vals.get(ch, 0)
if weight > 0:
	print('White')
elif weight == 0:
	print('Draw')
else:
	print('Black')


def Chess():
	chessUpperWords = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
	chessLowerWords = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
	upperNum = 0
	lowerNum = 0
	upper = []
	lower = []
	for i in range(8):
		n = input()
		upper.append([ch for ch in n if ch.isalpha() and ch.isupper()])
		lower.append([ch for ch in n if ch.isalpha() and ch.islower()])
	for j in upper:
		for i in j:
			if i in chessUpperWords.keys():
				upperNum += chessUpperWords[i]
	for l in lower:
		for i in l:
			if i in chessLowerWords.keys():
				lowerNum += chessLowerWords[i]
	if upperNum > lowerNum:
		return 'White'
	elif upperNum < lowerNum:
		return 'Black'
	elif upperNum == lowerNum:
		return 'Draw'
answer = Chess()
print(answer)


def check(b, c):
	if b == True:
		if c == 'Q':
			return 9
		elif c == 'R':
			return 5
		elif c == 'B' or c == 'N':
			return 3
		elif c == 'P':
			return 1
	elif c == 'q':
		return 9
	elif c == 'r':
		return 5
	elif c == 'b' or c == 'n':
		return 3
	elif c == 'p':
		return 1

def main():
	white = 0
	black = 0
	for i in range(8):
		m = input()
		for l in range(8):
			if m[l] == '.' or m[l] == 'k' or m[l] == 'K':
				continue
			d = m[l].isupper()
			plus = check(d, m[l])
			if d == True:
				white += plus
			else:
				black += plus
	if white > black:
		print('White')
	elif black > white:
		print('Black')
	else:
		print('Draw')
main()


d = []
for i in range(8):
	d.append(input())
w = 0
b = 0
for i in range(8):
	for j in range(8):
		if d[i][j] == '.':
			continue
		if d[i][j].islower():
			if d[i][j] == 'q':
				b += 9
			elif d[i][j] == 'r':
				b += 5
			elif d[i][j] == 'b' or d[i][j] == 'n':
				b += 3
			elif d[i][j] == 'p':
				b += 1
		elif d[i][j] == 'Q':
			w += 9
		elif d[i][j] == 'R':
			w += 5
		elif d[i][j] == 'B' or d[i][j] == 'N':
			w += 3
		elif d[i][j] == 'P':
			w += 1
if b > w:
	print('Black')
elif w > b:
	print('White')
else:
	print('Draw')


def chess(a):
	whi = 0
	bla = 0
	for i in range(8):
		for j in range(8):
			if a[i][j] == 'Q':
				whi += 9
			elif a[i][j] == 'R':
				whi += 5
			elif a[i][j] == 'B' or a[i][j] == 'N':
				whi += 3
			elif a[i][j] == 'P':
				whi += 1
			elif a[i][j] == 'q':
				bla += 9
			elif a[i][j] == 'r':
				bla += 5
			elif a[i][j] == 'b' or a[i][j] == 'n':
				bla += 3
			elif a[i][j] == 'p':
				bla += 1
	if whi > bla:
		print('White')
	elif bla > whi:
		print('Black')
	else:
		print('Draw')
a = []
for i in range(8):
	b = input('')
	a.append(b)
chess(a)


a = {}
a['.'] = 0
a['Q'] = 9
a['R'] = 5
a['B'] = 3
a['K'] = 0
a['P'] = 1
a['q'] = -9
a['r'] = -5
a['b'] = -3
a['k'] = 0
a['p'] = -1
a['N'] = 3
a['n'] = -3
suma = 0
for it in range(8):
	line = [a[x] for x in list(input().strip())]
	suma += sum(line)
if suma == 0:
	print('Draw')
elif suma > 0:
	print('White')
else:
	print('Black')


dict = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
(white, black) = (0, 0)
for x in range(0, 8):
	boardLine = input()
	for c in boardLine:
		if c.isupper():
			white += dict.get(c)
		elif dict.get(c.upper()) != None:
			black += dict.get(c.upper())
if white > black:
	print('White')
elif white == black:
	print('Draw')
else:
	print('Black')


dchess = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
wsum = 0
bsum = 0
{}
for i in range(8):
	t = input()
	for j in range(len(t)):
		if t[j] == '.':
			continue
		if t[j].isupper():
			wsum = wsum + dchess[t[j].lower()]
		else:
			bsum = bsum + dchess[t[j]]
if wsum > bsum:
	print('White')
elif bsum > wsum:
	print('Black')
else:
	print('Draw')


White = dict(zip('QRBNPK', [9, 5, 3, 3, 1, 0]))
Black = dict(zip('qrbnpk', [9, 5, 3, 3, 1, 0]))
black = 0
white = 0
for i in range(8):
	arr = input()
	for j in arr:
		if j in White:
			white += White[j]
		elif j in Black:
			black += Black[j]
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


C = [str(input()) for _ in range(8)]
A = 'QRBNPKqrbnpk'
L = [9, 5, 3, 3, 1, 0]
a = 0
b = 0
for i in range(8):
	for j in range(8):
		if C[i][j] != '.':
			e = A.index(C[i][j])
			if e >= 6:
				b += L[e - 6]
			else:
				a += L[e]
if a > b:
	print('White')
elif a < b:
	print('Black')
else:
	print('Draw')


zo = []
for i in range(8):
	l = list(input())
	zo.extend(l)
black = 9 * zo.count('q') + 5 * zo.count('r') + 3 * zo.count('b') + 3 * zo.count('n') + 1 * zo.count('p')
white = 9 * zo.count('Q') + 5 * zo.count('R') + 3 * zo.count('B') + 3 * zo.count('N') + 1 * zo.count('P')
print('White' if white > black else 'Black' if black > white else 'Draw')


def decode(x):
	y = ''
	for i in x:
		if i != '.':
			y = y + i + ' '
	return y
ll = ''
for i in range(8):
	l = input()
	ll = ll + l
li = []
li = decode(ll).split()
w = li.count('Q') * 9 + li.count('R') * 5 + li.count('B') * 3 + li.count('N') * 3 + li.count('P')
b = li.count('q') * 9 + li.count('r') * 5 + li.count('b') * 3 + li.count('n') * 3 + li.count('p')
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


d = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, '.': 0, 'K': 0, 'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, '.': 0, 'k': 0}
pw = pb = 0
for i in range(8):
	s = input()
	for c in s:
		if c.isupper():
			pw += d[c]
		else:
			pb += d[c]
if pw > pb:
	print('White')
elif pw < pb:
	print('Black')
else:
	print('Draw')


inpL = []
inpL += list(str(input()))
inpL += list(str(input()))
inpL += list(str(input()))
inpL += list(str(input()))
inpL += list(str(input()))
inpL += list(str(input()))
inpL += list(str(input()))
inpL += list(str(input()))
white = inpL.count('Q') * 9 + inpL.count('R') * 5 + inpL.count('B') * 3 + inpL.count('N') * 3 + inpL.count('P')
black = inpL.count('q') * 9 + inpL.count('r') * 5 + inpL.count('b') * 3 + inpL.count('n') * 3 + inpL.count('p')
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


wheights = {'q': 9, 'Q': 9, 'r': 5, 'R': 5, 'b': 3, 'B': 3, 'N': 3, 'n': 3, 'p': 1, 'P': 1, 'K': 0, 'k': 0, '.': 0}
white = 0
black = 0
for i in range(8):
	inp = input()
	for el in inp:
		if el.isupper():
			white += wheights[el]
		elif el.islower():
			black += wheights[el]
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


a = 0
b = 0
l = []
for i in range(8):
	n = input()
	l.append(n)
for i in range(8):
	for j in range(8):
		if l[i][j] == 'q':
			b += 9
		if l[i][j] == 'r':
			b += 5
		if l[i][j] == 'b' or l[i][j] == 'n':
			b += 3
		if l[i][j] == 'p':
			b += 1
		if l[i][j] == 'Q':
			a += 9
		if l[i][j] == 'R':
			a += 5
		if l[i][j] == 'B' or l[i][j] == 'N':
			a += 3
		if l[i][j] == 'P':
			a += 1
if a == b:
	print('Draw')
if a > b:
	print('White')
if a < b:
	print('Black')


def black(a):
	m = 0
	for i in a:
		i = list(i)
		for ii in i:
			if ii == 'r':
				m += 5
			if ii == 'q':
				m += 9
			if ii == 'b':
				m += 3
			if ii == 'n':
				m += 3
			if ii == 'p':
				m += 1
			if ii == 'k':
				m += 0
	return m

def white(a):
	m = 0
	for i in a:
		i = list(i)
		for ii in i:
			if ii == 'R':
				m += 5
			if ii == 'Q':
				m += 9
			if ii == 'B':
				m += 3
			if ii == 'N':
				m += 3
			if ii == 'P':
				m += 1
			if ii == 'K':
				m += 0
	return m
b = []
i = 0
while i < 8:
	a = input()
	b.append(a)
	i += 1
if white(b) > black(b):
	print('White')
if black(b) > white(b):
	print('Black')
if black(b) == white(b):
	print('Draw')


white = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
W_weight = 0
black = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
B_weight = 0
for i in range(8):
	line = input()
	for piece in line:
		if piece == '.':
			continue
		elif piece.isupper():
			for letter in white:
				if letter == piece:
					W_weight += white[letter]
		elif piece.islower():
			for letter in black:
				if letter == piece:
					B_weight += black[letter]
if W_weight > B_weight:
	print('White')
elif B_weight > W_weight:
	print('Black')
else:
	print('Draw')


pieces = ''
result = 0
for i in range(8):
	pieces += input()
weight = dict(zip(list('QRBNPqrbnp.Kk'), [9, 5, 3, 3, 1, -9, -5, -3, -3, -1, 0, 0, 0]))
for s in pieces:
	result += weight[s]
if result > 0:
	print('White')
elif result == 0:
	print('Draw')
else:
	print('Black')


dicB = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
DICw = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, '.': 0}
b = 0
w = 0
for i in range(8):
	line = input()
	for chess in line:
		try:
			b += dicB[chess]
		except:
			w += DICw[chess]
if b == w:
	print('Draw')
elif b > w:
	print('Black')
else:
	print('White')


import re
import collections

def intput():
	return [int(x) for x in input().split(' ')]

def main(board):
	white_score = [0]
	black_score = [0]

	def inc_fn(score, amount):

		def inc():
			score[0] += amount
		return inc
	score_map = collections.defaultdict(lambda : lambda : 0)
	pieces = [('Q', 9), ('R', 5), ('B', 3), ('N', 3), ('P', 1)]
	for (piece, value) in pieces:
		score_map[piece] = inc_fn(white_score, value)
		score_map[piece.lower()] = inc_fn(black_score, value)
	for square in board:
		score_map[square]()
	if white_score[0] > black_score[0]:
		print('White')
	elif black_score[0] > white_score[0]:
		print('Black')
	else:
		print('Draw')

def parse():
	return ''.join([input() for _ in range(8)])
main(parse())


valueDict = {'Q': 9, 'q': -9, 'R': 5, 'r': -5, 'B': 3, 'b': -3, 'N': 3, 'n': -3, 'P': 1, 'p': -1, '.': 0, 'K': 0, 'k': 0}
points = 0
for row in range(8):
	for char in input():
		points += valueDict[char]
if points < 0:
	print('Black')
elif points > 0:
	print('White')
else:
	print('Draw')


board = []
for i in range(8):
	board.append(input())
white = 0
black = 0
for i in range(8):
	for j in range(8):
		figure = board[i][j]
		if figure == 'Q':
			white += 9
		if figure == 'R':
			white += 5
		if figure == 'B' or figure == 'N':
			white += 3
		if figure == 'P':
			white += 1
		if figure == 'q':
			black += 9
		if figure == 'r':
			black += 5
		if figure == 'b' or figure == 'n':
			black += 3
		if figure == 'p':
			black += 1
if white > black:
	print('White')
if white < black:
	print('Black')
if white == black:
	print('Draw')


d = {'Q': 9, 'q': 9, '.': 0, 'R': 5, 'r': 5, 'K': 0, 'k': 0, 'B': 3, 'b': 3, 'N': 3, 'n': 3, 'p': 1, 'P': 1}
w = 0
b = 0
for _ in range(8):
	s = input()
	w += sum((d[i] for i in s if i.isupper()))
	b += sum((d[i] for i in s if i.islower()))
print('White' if w > b else 'Black' if b > w else 'Draw')


board = [input() for _ in range(8)]
weight = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
(white, black) = (0, 0)
for i in board:
	for j in i:
		if j in weight:
			black += weight[j]
		elif j.lower() in weight:
			white += weight[j.lower()]
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


mylist = [[None] * 8] * 8
white = 0
black = 0
for i in range(8):
	mylist[i] = list(input())
for i in range(8):
	for j in range(8):
		if mylist[i][j] == 'Q':
			white = white + 9
		elif mylist[i][j] == 'q':
			black = black + 9
		elif mylist[i][j] == 'R':
			white = white + 5
		elif mylist[i][j] == 'r':
			black = black + 5
		elif mylist[i][j] == 'B':
			white = white + 3
		elif mylist[i][j] == 'b':
			black = black + 3
		elif mylist[i][j] == 'N':
			white = white + 3
		elif mylist[i][j] == 'n':
			black = black + 3
		elif mylist[i][j] == 'P':
			white = white + 1
		elif mylist[i][j] == 'p':
			black = black + 1
if black > white:
	print('Black')
elif black < white:
	print('White')
else:
	print('Draw')


(wW, bW) = (0, 0)
for _ in range(8):
	curStr = input().strip()
	for l in curStr:
		if l == 'Q':
			wW += 9
		elif l == 'q':
			bW += 9
		elif l == 'R':
			wW += 5
		elif l == 'r':
			bW += 5
		elif l == 'B':
			wW += 3
		elif l == 'b':
			bW += 3
		elif l == 'N':
			wW += 3
		elif l == 'n':
			bW += 3
		elif l == 'P':
			wW += 1
		elif l == 'p':
			bW += 1
if wW > bW:
	print('White')
elif wW == bW:
	print('Draw')
else:
	print('Black')


from sys import stdin
inp = stdin.readline
black = 0
white = 0
for i in range(8):
	row = inp().strip()
	for j in row:
		if j == 'q':
			black += 9
		elif j == 'r':
			black += 5
		elif j == 'b':
			black += 3
		elif j == 'n':
			black += 3
		elif j == 'Q':
			white += 9
		elif j == 'R':
			white += 5
		elif j == 'B':
			white += 3
		elif j == 'N':
			white += 3
		elif j == 'p':
			black += 1
		elif j == 'P':
			white += 1
if black < white:
	print('White')
elif black == white:
	print('Draw')
else:
	print('Black')


w = ''
b = ''
s = ''
for i in range(8):
	s += input().strip()
for i in s:
	if i != '.':
		if i.isupper():
			w += i
		else:
			b += i

def weight(s):
	d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
	c = 0
	for i in s:
		c += d[i.lower()]
	return c
if weight(w) > weight(b):
	print('White')
elif weight(b) > weight(w):
	print('Black')
else:
	print('Draw')


G = [input() for _ in range(8)]
dict = {'q': 9, 'r': 5, 'b': 3, 'k': 0, 'p': 1, 'n': 3, 'Q': 9, 'R': 5, 'B': 3, 'K': 0, 'P': 1, 'N': 3}
(sum1, sum2) = [0, 0]
for i in range(8):
	for j in range(8):
		if G[i][j] == '.':
			continue
		elif G[i][j].isupper():
			sum1 += dict[G[i][j]]
		else:
			sum2 += dict[G[i][j]]
if sum1 > sum2:
	print('White')
elif sum1 == sum2:
	print('Draw')
else:
	print('Black')


white = 0
black = 0
figure_value = {'k': 0, 'p': 1, 'b': 3, 'n': 3, 'r': 5, 'q': 9}
for i in range(0, 8):
	a = input()
	a = a.split('.')
	for i in ''.join(a):
		value = figure_value[i.lower()]
		if i.isupper() == True:
			white += value
		else:
			black += value
if black > white:
	print('Black')
elif white > black:
	print('White')
else:
	print('Draw')


from collections import Counter
b = w = 0
a = []
for i in range(8):
	a.extend(' '.join(input()).split())
c = Counter(a)
w += c['Q'] * 9
w += c['R'] * 5
w += c['B'] * 3
w += c['N'] * 3
w += c['P'] * 1
b += c['q'] * 9
b += c['r'] * 5
b += c['b'] * 3
b += c['n'] * 3
b += c['p'] * 1
print('White' if w > b else 'Draw' if w == b else 'Black')


d1 = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
d2 = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
w = []
b = []
for i in range(8):
	s = input()
	for i in s:
		if i in d1:
			w.append(d1[i])
		elif i in d2:
			b.append(d2[i])
if sum(w) > sum(b):
	print('White')
elif sum(w) == sum(b):
	print('Draw')
else:
	print('Black')


s = ['q', 'r', 'b', 'n', 'p', 'k']
z = [chr(ord(n) - 32) for n in s]
k = [9, 5, 3, 3, 1, 0]
t = []
w = 0
b = 0
for n in range(8):
	t.append([n for n in input()])
for n in range(8):
	for l in range(8):
		if z.count(t[n][l]) != 0:
			w += k[z.index(t[n][l])]
		elif s.count(t[n][l]) != 0:
			b += k[s.index(t[n][l])]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


table = []
values = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1}
res = 0
for i in range(8):
	line = [x for x in input() if x != '.' and x != 'k' and (x != 'K')]
	if line:
		table.append(line)
for line in table:
	for piece in line:
		res += values[piece]
if res == 0:
	print('Draw')
elif res > 0:
	print('White')
else:
	print('Black')


(white, black) = ({'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, '.': 0, 'K': 0}, {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, '.': 0, 'k': 0})
(white_sum, black_sum) = (0, 0)
for x in range(8):
	for num in input():
		if num in white:
			white_sum += white[num]
		else:
			black_sum += black[num]
if white_sum > black_sum:
	print('White')
elif black_sum > white_sum:
	print('Black')
else:
	print('Draw')


t = 8
l1 = []
while t:
	l = list(map(str, input().split()))
	l1.append(l)
	t = t - 1
output = []
(s1, s2) = (0, 0)

def reemovNestings(l):
	for i in l:
		if type(i) == list:
			reemovNestings(i)
		else:
			output.append(i)
reemovNestings(l1)
for i in range(len(output)):
	for j in range(len(output[i])):
		if output[i][j] == 'Q':
			s1 += 9
		elif output[i][j] == 'R':
			s1 += 5
		elif output[i][j] == 'B':
			s1 += 3
		elif output[i][j] == 'N':
			s1 += 3
		elif output[i][j] == 'P':
			s1 += 1
		elif output[i][j] == 'K':
			s1 += 0
		elif output[i][j] == 'q':
			s2 += 9
		elif output[i][j] == 'r':
			s2 += 5
		elif output[i][j] == 'b':
			s2 += 3
		elif output[i][j] == 'n':
			s2 += 3
		elif output[i][j] == 'p':
			s2 += 1
		elif output[i][j] == 'k':
			s2 += 0
if s1 > s2:
	print('White')
elif s1 < s2:
	print('Black')
else:
	print('Draw')


a = 0
b = 0
x = {'Q': 9, 'q': 9, 'R': 5, 'r': 5, 'B': 3, 'b': 3, 'N': 3, 'n': 3, 'P': 1, 'p': 1}
for i in range(8):
	t = [i for i in input()]
	for i in t:
		if ord(i) >= 97 and i in x:
			a += x[i]
		elif i in x:
			b += x[i]
if a == b:
	print('Draw')
elif a < b:
	print('White')
else:
	print('Black')


(wt, bt) = (0, 0)
for _ in range(8):
	s = input()
	for i in range(8):
		if s[i] == '.':
			continue
		if s[i] == 'K':
			wt += 0
		if s[i] == 'Q':
			wt += 9
		if s[i] == 'R':
			wt += 5
		if s[i] == 'B' or s[i] == 'N':
			wt += 3
		if s[i] == 'P':
			wt += 1
		if s[i] == 'k':
			bt += 0
		if s[i] == 'q':
			bt += 9
		if s[i] == 'r':
			bt += 5
		if s[i] == 'b' or s[i] == 'n':
			bt += 3
		if s[i] == 'p':
			bt += 1
if wt > bt:
	print('White')
elif bt > wt:
	print('Black')
else:
	print('Draw')


(ww, bw) = (0, 0)
for i in range(8):
	s = input()
	for j in s:
		if 65 <= ord(j) <= 90:
			if j == 'Q':
				ww += 9
			elif j == 'R':
				ww += 5
			elif j == 'B' or j == 'N':
				ww += 3
			elif j == 'P':
				ww += 1
		elif 97 <= ord(j) <= 122:
			if j == 'q':
				bw += 9
			elif j == 'r':
				bw += 5
			elif j == 'b' or j == 'n':
				bw += 3
			elif j == 'p':
				bw += 1
if ww > bw:
	print('White')
elif bw > ww:
	print('Black')
else:
	print('Draw')


W = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
s = [0, 0]
for _ in range(8):
	for c in input():
		w = W.get(c.lower())
		if w:
			s[c.islower()] += w
if s[0] > s[1]:
	print('White')
elif s[1] > s[0]:
	print('Black')
else:
	print('Draw')


def main():
	WH = 'QRBNP'
	Num = [9, 5, 3, 3, 1]
	BL = 'qrbnp'
	WHc = 0
	BLc = 0
	for i in range(8):
		a = input()
		for j in range(8):
			if a[j] in WH:
				WHc += Num[WH.rfind(a[j])]
			elif a[j] in BL:
				BLc += Num[BL.rfind(a[j])]
	if BLc < WHc:
		print('White')
	elif WHc < BLc:
		print('Black')
	else:
		print('Draw')
main()


a = ''.join((input() for _ in range(8)))
x = lambda b: b.count('P') + 3 * b.count('N') + 3 * b.count('B') + 5 * b.count('R') + 9 * b.count('Q')
w = x(a)
b = x(a.upper()) - w
print('Draw' if w == b else 'White' if w > b else 'Black')


l = []
for k in range(8):
	l.append(input())
(white, black) = (0, 0)
b = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
w = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
for i in range(8):
	for j in range(8):
		if l[i][j] != '.':
			x = w.get(l[i][j])
			y = b.get(l[i][j])
			if type(x) is int:
				white = white + x
			elif type(y) is int:
				black = black + y
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


q = dict(zip('qrbnpk', [9, 5, 3, 3, 1, 0]))
(point1, point2) = (0, 0)
for _ in range(8):
	s = input()
	for i in range(len(s)):
		if s[i].isupper():
			point1 += q[s[i].lower()]
		elif s[i].islower():
			point2 += q[s[i]]
if point1 == point2:
	print('Draw')
else:
	print('White' if point1 > point2 else 'Black')


rozmer = 8
hodnoty = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(biely, cierny) = (0, 0)
for i in range(rozmer):
	riadok = input()
	for znak in riadok:
		if znak != '.':
			if znak.islower():
				cierny += hodnoty[znak.lower()]
			elif znak.isupper():
				biely += hodnoty[znak.lower()]
if cierny > biely:
	print('Black')
elif cierny == biely:
	print('Draw')
elif cierny < biely:
	print('White')


white = ['Q', 'R', 'B', 'N', 'P']
black = ['q', 'r', 'b', 'n', 'p']
points = [9, 5, 3, 3, 1]
(sum1, sum2) = (0, 0)
for i in range(8):
	line = input()
	for char in line:
		if char in white:
			sum1 += points[white.index(char)]
		elif char in black:
			sum2 += points[black.index(char)]
if sum1 == sum2:
	print('Draw')
elif sum1 > sum2:
	print('White')
else:
	print('Black')


white = 0
black = 0
d = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
for _ in range(8):
	s = input()
	for i in s:
		if i != '.':
			if i == i.upper():
				white += d[i]
			else:
				black += d[i.upper()]
if white > black:
	print('White')
elif white == black:
	print('Draw')
else:
	print('Black')


__author__ = 'Andrey'
values = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, 'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
table = []
w = 0
b = 0
for q in range(8):
	row = input()
	for char in row:
		if char == '.':
			continue
		elif char.isupper():
			w += values[char]
		else:
			b += values[char]
if w > b:
	print('White')
elif w == b:
	print('Draw')
else:
	print('Black')


a = []
c = ['Q', 'R', 'B', 'N', 'P']
d = ['q', 'r', 'b', 'n', 'p']
W = 0
B = 0
for i in range(8):
	b = list(input())
	a.append(b)
for i in range(8):
	for j in range(8):
		if a[i][j] in c:
			if a[i][j] == 'Q':
				W += 9
			elif a[i][j] == 'R':
				W += 5
			elif a[i][j] == 'B' or a[i][j] == 'N':
				W += 3
			elif a[i][j] == 'P':
				W += 1
		elif a[i][j] in d:
			if a[i][j] == 'q':
				B += 9
			elif a[i][j] == 'r':
				B += 5
			elif a[i][j] == 'b' or a[i][j] == 'n':
				B += 3
			elif a[i][j] == 'p':
				B += 1
if B > W:
	print('Black')
elif B == W:
	print('Draw')
else:
	print('White')


x = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
y = {i.upper(): -v for (i, v) in x.items()}
z = {**x, **y}
s = sum((z[v] for _r in range(8) for v in input()))
print('White' if s < 0 else 'Black' if s > 0 else 'Draw')


m = []
f = {'.': 0, 'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1, 'k': 0, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
for i in range(8):
	m.append(list(input()))
cnt = 0
for s in m:
	for c in s:
		if c in f:
			cnt += f[c]
if cnt > 0:
	print('White')
elif cnt < 0:
	print('Black')
else:
	print('Draw')


white = 0
w = ('Q', 'R', 'B', 'N', 'P')
black = 0
b = ('q', 'r', 'b', 'n', 'p')
point = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
for i in range(0, 8):
	row = input()
	for c in row:
		if c == '.':
			continue
		if c in w:
			white += point[c]
		if c in b:
			black += point[c]
print('White' if white > black else 'Black' if white < black else 'Draw')


import sys
text = ''.join(sys.stdin.readlines())
count = 0
pieces = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, 'Q': -9, 'R': -5, 'B': -3, 'N': -3, 'P': -1, 'K': 0}
for x in text:
	if x.isalpha():
		count += pieces[x]
print('White' if count < 0 else 'Black' if count > 0 else 'Draw')


white = 0
W = 'APNBARAAAQ'
black = 0
B = 'apnbaraaaq'
for i in range(8):
	line = input()
	for j in line:
		if j in W:
			white += W.index(j)
			if j == 'N':
				white += 1
		elif j in B:
			black += B.index(j)
			if j == 'n':
				black += 1
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


from sys import stdin
input = stdin.readline
a = {'Q': 9, 'R': 5, 'N': 3, 'B': 3, 'P': 1}

def chess(b, w):
	for i in range(8):
		for j in input().strip():
			if j not in 'Kk':
				if j.isupper():
					w += a.get(j, 0)
				elif j.islower():
					b += a.get(j.upper(), 0)
	if b < w:
		return 'White'
	if w < b:
		return 'Black'
	return 'Draw'
print(chess(0, 0))


chessBoard = []
for i in range(8):
	x = input()
	chessBoard.append(x)
whiteWeight = 0
blackWeight = 0
for i in range(8):
	for j in range(8):
		if chessBoard[i][j] == 'Q':
			whiteWeight += 9
		elif chessBoard[i][j] == 'R':
			whiteWeight += 5
		elif chessBoard[i][j] == 'B':
			whiteWeight += 3
		elif chessBoard[i][j] == 'N':
			whiteWeight += 3
		elif chessBoard[i][j] == 'P':
			whiteWeight += 1
		elif chessBoard[i][j] == 'q':
			blackWeight += 9
		elif chessBoard[i][j] == 'r':
			blackWeight += 5
		elif chessBoard[i][j] == 'b':
			blackWeight += 3
		elif chessBoard[i][j] == 'n':
			blackWeight += 3
		elif chessBoard[i][j] == 'p':
			blackWeight += 1
if blackWeight == whiteWeight:
	print('Draw')
elif blackWeight > whiteWeight:
	print('Black')
else:
	print('White')


__author__ = 'eunice'

class A:

	def a(self, board):
		aCount = 0
		bcount = 0
		values = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, 'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0, '.': 0}
		validvalues = {'q', 'r', 'b', 'n', 'p', 'k', '.'}
		for i in board:
			if i.lower() in validvalues:
				if i.islower():
					bcount += values[i]
				else:
					aCount += values[i]
		if aCount > bcount:
			return 'White'
		elif bcount > aCount:
			return 'Black'
		else:
			return 'Draw'
board = ''
for i in range(0, 8):
	s = input()
	board += s
print(A().a(board))


a = 0
b = 0
score = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
for i in range(8):
	for x in input():
		if x.upper() in score:
			if x == x.upper():
				a += score[x.upper()]
			else:
				b += score[x.upper()]
if a > b:
	print('White')
elif a < b:
	print('Black')
else:
	print('Draw')


b = 0
w = 0
for l in range(8):
	s = input()
	for u in range(8):
		if s[u] == '.':
			b = b + 0
		elif s[u] == 'r':
			b = b + 5
		elif s[u] == 'b':
			b = b + 3
		elif s[u] == 'n':
			b = b + 3
		elif s[u] == 'p':
			b = b + 1
		elif s[u] == 'k':
			b = b + 0
		elif s[u] == 'q':
			b = b + 9
		elif s[u] == 'Q':
			w = w + 9
		elif s[u] == 'R':
			w = w + 5
		elif s[u] == 'B':
			w = w + 3
		elif s[u] == 'N':
			w = w + 3
		elif s[u] == 'P':
			w = w + 1
		elif s[u] == 'K':
			w = w + 0
if w > b:
	print('White')
elif w < b:
	print('Black')
elif w == b:
	print('Draw')


t = [ord('Q'), ord('R'), ord('B'), ord('N'), ord('P'), ord('q'), ord('r'), ord('b'), ord('n'), ord('p')]
s = [9, 5, 3, 3, 1, 9, 5, 3, 3, 1]
blck = 0
wht = 0
for k in range(8):
	a = input()
	for i in range(8):
		if ord(a[i]) in t:
			if 97 <= ord(a[i]) <= 122:
				blck += s[t.index(ord(a[i]))]
			elif 65 <= ord(a[i]) <= 90:
				wht += s[t.index(ord(a[i]))]
if blck > wht:
	print('Black')
elif blck < wht:
	print('White')
else:
	print('Draw')


def winner(s):
	weights = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
	white = 0
	black = 0
	for i in s:
		for j in i:
			if j.isupper():
				white += weights[j]
			elif j.islower():
				black += weights[j.upper()]
	if white > black:
		return 'White'
	if black > white:
		return 'Black'
	return 'Draw'
s = []
for i in range(8):
	x = input()
	s.append(x)
print(winner(s))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	a = ''.join([S() for _ in range(8)])
	c = collections.Counter(a)
	t = ['q', 'r', 'b', 'n', 'p', 'k']
	k = [9, 5, 3, 3, 1, 0]
	r = 0
	for i in range(5):
		r += c[t[i]] * k[i]
		r -= c[t[i].upper()] * k[i]
	if r == 0:
		return 'Draw'
	if r < 0:
		return 'White'
	return 'Black'
print(main())


white = 0
black = 0

def upper_check(txt, value):
	global white
	global black
	if txt.isupper():
		white += value
	else:
		black += value
	return (white, black)

def adder(line):
	for x in line:
		if x == '.':
			value = 0
		elif x == 'q' or x == 'Q':
			value = 9
		elif x == 'r' or x == 'R':
			value = 5
		elif x == 'b' or x == 'B':
			value = 3
		elif x == 'n' or x == 'N':
			value = 3
		elif x == 'p' or x == 'P':
			value = 1
		elif x == 'k' or x == 'K':
			value = 0
		upper_check(x, value)
for i in range(8):
	line = list(input())
	adder(line)
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


w = 0
b = 0
dw = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
db = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
for i in range(8):
	s = input()
	for j in range(len(s)):
		if s[j] in dw:
			w += dw[s[j]]
		if s[j] in db:
			b += db[s[j]]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


def calc_score(ch):
	score_map = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
	return score_map[ch.lower()]

def main():
	lines = [input() for _ in range(8)]
	white_score = sum((sum((calc_score(ch) for ch in line if not ch.islower())) for line in lines))
	black_score = sum((sum((calc_score(ch) for ch in line if ch.islower())) for line in lines))
	if white_score > black_score:
		print('White')
	elif white_score < black_score:
		print('Black')
	else:
		print('Draw')
main()


w = 0
bl = 0
for i in range(8):
	a = input()
	R = a.count('R')
	Q = a.count('Q')
	B = a.count('B')
	N = a.count('N')
	P = a.count('P')
	K = a.count('K')
	q = a.count('q')
	r = a.count('r')
	b = a.count('b')
	n = a.count('n')
	p = a.count('p')
	k = a.count('k')
	w += R * 5 + Q * 9 + B * 3 + N * 3 + P
	bl += r * 5 + q * 9 + b * 3 + n * 3 + p
if w > bl:
	print('White')
elif w < bl:
	print('Black')
else:
	print('Draw')


u = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
lo = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
w = 0
b = 0
for _ in range(8):
	l = input()
	for i in l:
		if i == '.':
			pass
		elif i.isupper():
			w = w + u[i]
		else:
			b = b + lo[i]
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


w = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(white, black) = (0, 0)
for i in range(8):
	for f in input():
		if f != '.' and f.isupper():
			white += w[f.lower()]
		elif f != '.':
			black += w[f]
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


(a, b) = (0, 0)
t = '95331'
(x, y) = ('QRBNP', 'qrbnp')
for i in '0' * 8:
	s = input()
	for j in s:
		if j in x:
			a += int(t[x.index(j)])
		elif j in y:
			b += int(t[y.index(j)])
if a == b:
	print('Draw')
else:
	print(['White', 'Black'][a < b])


d = dict(zip('qrbnp', [9, 5, 3, 3, 1]))
a = ''.join([input() for _ in [0] * 8])
b = sum((a.count(x) * d[x] for x in 'qrbnp'))
w = sum((a.count(x) * d[x.lower()] for x in 'QRBNP' if x in a))
print([['White', 'Black'][b > w], 'Draw'][w == b])


weights = {}
weights['q'] = 9
weights['r'] = 5
weights['b'] = 3
weights['n'] = 3
weights['p'] = 1
weights['k'] = 0
weights['Q'] = 9
weights['R'] = 5
weights['B'] = 3
weights['N'] = 3
weights['P'] = 1
weights['K'] = 0
weights['.'] = 0
board = []
for i in range(0, 8):
	board.append(input())
white = 0
black = 0
for x in board:
	for y in x:
		if y.isupper():
			white = white + weights[y]
		else:
			black = black + weights[y]
if white > black:
	print('White')
elif white < black:
	print('Black')
else:
	print('Draw')


k1 = 0
k2 = 0
for i in range(8):
	S = input()
	for j in range(8):
		if S[j] == 'Q':
			k1 = k1 + 9
		if S[j] == 'P':
			k1 = k1 + 1
		if S[j] == 'R':
			k1 = k1 + 5
		if S[j] == 'B':
			k1 = k1 + 3
		if S[j] == 'N':
			k1 = k1 + 3
		if S[j] == 'q':
			k2 = k2 + 9
		if S[j] == 'p':
			k2 = k2 + 1
		if S[j] == 'r':
			k2 = k2 + 5
		if S[j] == 'b':
			k2 = k2 + 3
		if S[j] == 'n':
			k2 = k2 + 3
if k1 > k2:
	print('White')
elif k1 < k2:
	print('Black')
else:
	print('Draw')


whp = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
(wh, bl) = (0, 0)
for j in range(8):
	stri = list(input())
	for i in stri:
		if i != '.' and i != 'K' and (i.upper() != 'K'):
			if i in list(whp.keys()):
				wh += whp[i]
			else:
				bl += whp[i.upper()]
if wh == bl:
	print('Draw')
elif wh > bl:
	print('White')
else:
	print('Black')


whites = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
blacks = {'q': -9, 'r': -5, 'b': -3, 'n': -3, 'p': -1}
white_value = 0
black_value = 0
n = []
for i in range(8):
	n += [list(input().split())]
	for j in n[-1]:
		for q in j:
			if q in whites:
				white_value += whites[q]
			elif q in blacks:
				black_value += abs(blacks[q])
if white_value > black_value:
	print('White')
elif white_value == black_value:
	print('Draw')
else:
	print('Black')


mydict = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
mydict2 = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
black_score = 0
white_score = 0
for i in range(8):
	string = input()
	for i in string:
		if i in mydict:
			black_score = black_score + mydict[i]
		elif i in mydict2:
			white_score = white_score + mydict2[i]
if black_score > white_score:
	print('Black')
elif white_score > black_score:
	print('White')
else:
	print('Draw')


weights = {'Q': 9, 'q': 9, 'r': 5, 'R': 5, 'B': 3, 'b': 3, 'n': 3, 'N': 3, 'p': 1, 'P': 1, 'k': 0, 'K': 0}
w = b = 0
chessboard = ''
for i in range(8):
	chessboard += input()
for i in range(64):
	if 'B' <= chessboard[i] <= 'R':
		w += weights[chessboard[i]]
	elif 'b' <= chessboard[i] <= 'r':
		b += weights[chessboard[i]]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


(q, r, b, n, p, k) = (9, 5, 3, 3, 1, 0)
upperweight = 0
lowerweight = 0
for i in range(8):
	inp = input()
	for j in inp:
		if j != '.':
			if j.upper() == j:
				upperweight += eval(j.lower())
			else:
				lowerweight += eval(j)
if upperweight > lowerweight:
	print('White')
elif upperweight < lowerweight:
	print('Black')
else:
	print('Draw')


a = [input() for _ in range(8)]
b = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
c = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(l, k) = (0, 0)
for i in a:
	for j in range(8):
		if i[j].isupper():
			l += b[i[j]]
		if i[j].islower():
			k += c[i[j]]
if l > k:
	print('White')
elif k > l:
	print('Black')
else:
	print('Draw')


a = input()
b = input()
c = input()
d = input()
e = input()
f = input()
g = input()
h = input()
B = 0
W = 0
for x in a:
	if x == 'Q':
		W += 9
	if x == 'R':
		W += 5
	if x == 'B':
		W += 3
	if x == 'N':
		W += 3
	if x == 'P':
		W += 1
	if x == 'q':
		B += 9
	if x == 'r':
		B += 5
	if x == 'b':
		B += 3
	if x == 'n':
		B += 3
	if x == 'p':
		B += 1
for x in b:
	if x == 'Q':
		W += 9
	if x == 'R':
		W += 5
	if x == 'B':
		W += 3
	if x == 'N':
		W += 3
	if x == 'P':
		W += 1
	if x == 'q':
		B += 9
	if x == 'r':
		B += 5
	if x == 'b':
		B += 3
	if x == 'n':
		B += 3
	if x == 'p':
		B += 1
for x in c:
	if x == 'Q':
		W += 9
	if x == 'R':
		W += 5
	if x == 'B':
		W += 3
	if x == 'N':
		W += 3
	if x == 'P':
		W += 1
	if x == 'q':
		B += 9
	if x == 'r':
		B += 5
	if x == 'b':
		B += 3
	if x == 'n':
		B += 3
	if x == 'p':
		B += 1
for x in d:
	if x == 'Q':
		W += 9
	if x == 'R':
		W += 5
	if x == 'B':
		W += 3
	if x == 'N':
		W += 3
	if x == 'P':
		W += 1
	if x == 'q':
		B += 9
	if x == 'r':
		B += 5
	if x == 'b':
		B += 3
	if x == 'n':
		B += 3
	if x == 'p':
		B += 1
for x in e:
	if x == 'Q':
		W += 9
	if x == 'R':
		W += 5
	if x == 'B':
		W += 3
	if x == 'N':
		W += 3
	if x == 'P':
		W += 1
	if x == 'q':
		B += 9
	if x == 'r':
		B += 5
	if x == 'b':
		B += 3
	if x == 'n':
		B += 3
	if x == 'p':
		B += 1
for x in f:
	if x == 'Q':
		W += 9
	if x == 'R':
		W += 5
	if x == 'B':
		W += 3
	if x == 'N':
		W += 3
	if x == 'P':
		W += 1
	if x == 'q':
		B += 9
	if x == 'r':
		B += 5
	if x == 'b':
		B += 3
	if x == 'n':
		B += 3
	if x == 'p':
		B += 1
for x in g:
	if x == 'Q':
		W += 9
	if x == 'R':
		W += 5
	if x == 'B':
		W += 3
	if x == 'N':
		W += 3
	if x == 'P':
		W += 1
	if x == 'q':
		B += 9
	if x == 'r':
		B += 5
	if x == 'b':
		B += 3
	if x == 'n':
		B += 3
	if x == 'p':
		B += 1
for x in h:
	if x == 'Q':
		W += 9
	if x == 'R':
		W += 5
	if x == 'B':
		W += 3
	if x == 'N':
		W += 3
	if x == 'P':
		W += 1
	if x == 'q':
		B += 9
	if x == 'r':
		B += 5
	if x == 'b':
		B += 3
	if x == 'n':
		B += 3
	if x == 'p':
		B += 1
if W > B:
	print('White')
elif W < B:
	print('Black')
else:
	print('Draw')


whites = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
blacks = {i.lower(): whites[i] for i in whites}
w = 0
b = 0
for i in range(8):
	s = input()
	for l in s:
		if l in whites:
			w += whites[l]
		if l in blacks:
			b += blacks[l]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


d = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
f = list()
for _ in range(8):
	f.append(input())
black = 0
white = 0
for row in f:
	for col in row:
		if col == '.':
			continue
		if col.lower() == col:
			black += d[col]
		else:
			white += d[col.lower()]
if black > white:
	print('Black')
elif white > black:
	print('White')
else:
	print('Draw')


stra = input() + input() + input() + input() + input() + input() + input() + input()
a1 = 0
a2 = 0
for au in stra:
	if au == 'Q':
		a1 += 9
	if au == 'R':
		a1 += 5
	if au == 'B':
		a1 += 3
	if au == 'N':
		a1 += 3
	if au == 'P':
		a1 += 1
	if au == 'q':
		a2 += 9
	if au == 'r':
		a2 += 5
	if au == 'b':
		a2 += 3
	if au == 'n':
		a2 += 3
	if au == 'p':
		a2 += 1
if a1 > a2:
	print('White')
elif a1 < a2:
	print('Black')
else:
	print('Draw')


white = 0
black = 0
for x in range(8):
	l = input().strip()[:8]
	for y in l:
		if y.isupper() == True:
			if y == 'Q':
				white += 9
			elif y == 'R':
				white += 5
			elif y == 'B' or y == 'N':
				white += 3
			elif y != 'K' and y != '.':
				white += 1
		elif y == 'q':
			black += 9
		elif y == 'r':
			black += 5
		elif y == 'b' or y == 'n':
			black += 3
		elif y != 'k' and y != '.':
			black += 1
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


wlis = list('QRBNPK')
blis = list('qrbnpk')
lis = [9, 5, 3, 3, 1, 0]
white = 0
black = 0
for _ in range(8):
	l = list(input())
	for i in l:
		if i != '.':
			if i.isupper():
				white += lis[wlis.index(i)]
			else:
				black += lis[blis.index(i)]
if white == black:
	print('Draw')
elif white > black:
	print('White')
else:
	print('Black')


def get_figures_weights():
	figures = {}
	figures['q'] = 9
	figures['r'] = 5
	figures['b'] = 3
	figures['n'] = 3
	figures['p'] = 1
	figures['k'] = 0
	figures['.'] = 0
	return figures

def main():
	weight_difference = 0
	figures = get_figures_weights()
	for i in range(8):
		line = input()
		weight_difference += sum(map(lambda s: -figures[s] if s.islower() else figures[s.lower()], line))
	if weight_difference > 0:
		print('White')
	elif weight_difference < 0:
		print('Black')
	else:
		print('Draw')
main()


white_dic = {'Q': '9', 'R': '5', 'B': '3', 'N': '3', 'P': '1', 'K': '0'}
count_white = 0
count_black = 0
for i in range(8):
	l = input()
	for value in l:
		if value != '.' and value == value.upper():
			count_white += int(white_dic[value])
		elif value != '.' and value == value.lower():
			count_black += int(white_dic[value.upper()])
if count_white > count_black:
	print('White')
elif count_white == count_black:
	print('Draw')
else:
	print('Black')


g = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}
matrix = []
for i in range(8):
	matrix.append(input())
(white, black) = (0, 0)
for i in range(8):
	for letter in matrix[i]:
		if letter.isupper():
			white += g[letter.lower()]
		else:
			black += g[letter]
if white == black:
	print('Draw')
elif white > black:
	print('White')
else:
	print('Black')


chees = ''.join([input() for _ in range(8)])
wh = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
bl = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
w = sum([wh[ch] for ch in chees if ch.isupper()])
b = sum([bl[ch] for ch in chees if ch.islower()])
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


q = ''
for i in range(8):
	p = input()
	p = p.replace('.', '')
	q += p
(M, m) = (q.count('Q'), q.count('q'))
(R, r) = (q.count('R'), q.count('r'))
(N, n) = (q.count('N'), q.count('n'))
(B, b) = (q.count('B'), q.count('b'))
(Z, z) = (q.count('P'), q.count('p'))
x = 9 * M + R * 5 + 3 * N + 3 * B + Z
y = 9 * m + 5 * r + 3 * n + 3 * b + z
if x > y:
	print('White')
elif y > x:
	print('Black')
else:
	print('Draw')


import sys
score = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
B = 0
W = 0
for line in sys.stdin:
	for c in line:
		if c == '.' or c == '\n':
			continue
		if c.islower():
			B += score[c.lower()]
		else:
			W += score[c.lower()]
if B > W:
	print('Black')
elif B == W:
	print('Draw')
else:
	print('White')


w = 0
b = 0
f = ['.', 'P', 'N', 'B', 'R', 'Q', 'K', 'p', 'n', 'b', 'r', 'q', 'k']
k = [0, 1, 3, 3, 5, 9, 0, 1, 3, 3, 5, 9, 0]
for i in range(0, 8):
	s = input()
	for j in range(0, 8):
		d = f.index(s[j])
		if d < 7:
			w += k[d]
		else:
			b += k[d]
if w > b:
	print('White')
elif w < b:
	print('Black')
else:
	print('Draw')


a = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
b = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(w, w1) = (0, 0)
for _ in ' ' * 8:
	p = input().replace('.', '')
	for i in p:
		if i.isupper():
			w += a[i]
			continue
		w1 += b[i]
print(['White', ['Black', 'Draw'][w == w1]][w <= w1])


def main():
	white = 0
	black = 0
	for i in range(8):
		line = input()
		white += 9 * line.count('Q')
		white += 5 * line.count('R')
		white += 3 * line.count('B')
		white += 3 * line.count('N')
		white += 1 * line.count('P')
		black += 9 * line.count('q')
		black += 5 * line.count('r')
		black += 3 * line.count('b')
		black += 3 * line.count('n')
		black += 1 * line.count('p')
	if white > black:
		print('White')
	elif black > white:
		print('Black')
	else:
		print('Draw')
main()


data = [input() for _ in range(8)]
price = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
(white, black) = (0, 0)
for i in range(8):
	for j in range(8):
		if data[i][j] == '.':
			continue
		if 'A' <= data[i][j] <= 'Z':
			white += price[data[i][j].lower()]
		else:
			black += price[data[i][j]]
if white > black:
	print('White')
elif white == black:
	print('Draw')
else:
	print('Black')


def getPoint(q):
	val = ord(q)
	if val >= 97:
		val = val - 32
	val = chr(val)
	if val == 'Q':
		return 9
	elif val == 'R':
		return 5
	elif val == 'B':
		return 3
	elif val == 'N':
		return 3
	elif val == 'P':
		return 1
	else:
		return 0

def upper(q):
	val = ord(q)
	return val >= 65 and val <= 90
(one, two) = (0, 0)
for i in range(8):
	line = input()
	for j in range(8):
		if upper(line[j]):
			one += getPoint(line[j])
		else:
			two += getPoint(line[j])
res = 'Draw'
if one > two:
	res = 'White'
elif one < two:
	res = 'Black'
print(res)


sumwhite = 0
sumblack = 0
for n in range(8):
	line = input()
	for ch in line:
		if ch == '.':
			continue
		elif ch == 'Q':
			sumwhite += 9
		elif ch == 'R':
			sumwhite += 5
		elif ch == 'B':
			sumwhite += 3
		elif ch == 'N':
			sumwhite += 3
		elif ch == 'P':
			sumwhite += 1
		elif ch == 'q':
			sumblack += 9
		elif ch == 'r':
			sumblack += 5
		elif ch == 'b':
			sumblack += 3
		elif ch == 'n':
			sumblack += 3
		elif ch == 'p':
			sumblack += 1
if sumblack > sumwhite:
	print('Black')
elif sumblack == sumwhite:
	print('Draw')
else:
	print('White')


import sys
read = lambda t=int: list(map(t, sys.stdin.readline().split()))
array = lambda *ds: [array(*ds[1:]) for _ in range(ds[0])] if ds else 0
val = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
s = ''.join((sys.stdin.readline() for _ in range(8)))
res = 0
for c in s:
	if c.islower():
		res += val.get(c, 0)
	else:
		res -= val.get(c.lower(), 0)
if res == 0:
	print('Draw')
if res < 0:
	print('White')
if res > 0:
	print('Black')


from sys import stdin
c = [x.rstrip() for x in stdin.readlines()]
val = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, '.': 0, 'k': 0}
l = sum((sum(((-1) ** (int(y.isupper()) + 1) * val[y.lower()] for y in x)) for x in c))
if l > 0:
	print('White')
elif l < 0:
	print('Black')
else:
	print('Draw')


l = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
w = 0
b = 0
for i in range(8):
	s = input()
	for j in s:
		if j != '.':
			if ord(j) >= 97:
				b += l[str(chr(ord(j) - 32))]
			else:
				w += l[j]
if w > b:
	print('White')
elif b > w:
	print('Black')
else:
	print('Draw')


def chess(ls):
	dic = {'q': 9, 'Q': 9, 'b': 3, 'B': 3, 'r': 5, 'R': 5, 'n': 3, 'N': 3, 'p': 1, 'P': 1, 'k': 0, 'K': 0}
	s1 = 0
	s2 = 0
	k = 0
	ls1 = ['B', 'Q', 'R', 'N', 'P', 'K']
	for i in range(8):
		ls[i] = list(ls[i])
		for j in range(8):
			if ls[i][j] != '.':
				if ls[i][j] in ls1:
					s1 = s1 + dic[ls[i][j]]
				else:
					s2 = s2 + dic[ls[i][j]]
	if s1 == s2:
		return 'Draw'
	elif s1 < s2:
		return 'Black'
	else:
		return 'White'
ls = [input() for i in range(8)]
print(chess(ls))


(CountB, CountW) = (0, 0)
dict = {}
dict['q'] = 9
dict['r'] = 5
dict['b'] = 3
dict['k'] = 0
dict['p'] = 1
dict['n'] = 3
for i in range(8):
	s = str(input())
	for j in s:
		if j != '.' and j.upper() == j:
			CountW += dict[j.lower()]
		elif j != '.' and j.lower() == j:
			CountB += dict[j.lower()]
if CountB == CountW:
	print('Draw')
elif CountB > CountW:
	print('Black')
else:
	print('White')


__author__ = 'artyom'
weights = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
totals = [0, 0]
for cell in ''.join([input() for _ in range(8)]):
	if cell in weights:
		totals[0] += weights[cell]
	low_cell = cell.lower()
	if low_cell != cell and low_cell in weights:
		totals[1] += weights[low_cell]
print('Black' if totals[0] > totals[1] else 'White' if totals[0] < totals[1] else 'Draw')


POINTS = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0, '.': 0}

def get_value():
	white = 0
	black = 0
	for i in range(8):
		for word_row in input():
			for ch in word_row:
				if ch.isupper():
					white += POINTS[ch.lower()]
				else:
					black += POINTS[ch]
	if white == black:
		return 'Draw'
	elif white > black:
		return 'White'
	else:
		return 'Black'
print(get_value())


l = []
price = [9, 5, 3, 3, 1]
white = ['Q', 'R', 'B', 'N', 'P']
black = ['q', 'r', 'b', 'n', 'p']
(white_cost, black_cost) = (0, 0)
for i in range(8):
	a = input()
	for j in range(8):
		if a[j] == '.' or a[j] == 'k' or a[j] == 'K':
			continue
		if a[j] in white:
			x = white.index(a[j])
			white_cost += price[x]
		if a[j] in black:
			x = black.index(a[j])
			black_cost += price[x]
if white_cost > black_cost:
	print('White')
elif black_cost > white_cost:
	print('Black')
else:
	print('Draw')


ch = []
for i in range(8):
	ch.append(input())
small = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1, 'k': 0}
big = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1, 'K': 0}
black = 0
white = 0
for i in ch:
	for c in i:
		if c in small:
			black += small[c]
		elif c in big:
			white += big[c]
if black > white:
	print('Black')
elif white > black:
	print('White')
else:
	print('Draw')


data = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
white = black = 0
for i in range(8):
	temp = input().strip()
	for char in temp:
		if char.upper() in data:
			if char.isupper():
				white += data[char]
			else:
				black += data[char.upper()]
if white > black:
	print('White')
elif white == black:
	print('Draw')
else:
	print('Black')


White = 0
Black = 0
chesslist = []
for lines in range(8):
	line = input()
	for elem in list(line):
		chesslist.append(elem)
for i in chesslist:
	if i == 'Q':
		White += 9
	elif i == 'R':
		White += 5
	elif i == 'B':
		White += 3
	elif i == 'N':
		White += 3
	elif i == 'P':
		White += 1
	elif i == 'q':
		Black += 9
	elif i == 'r':
		Black += 5
	elif i == 'b':
		Black += 3
	elif i == 'n':
		Black += 3
	elif i == 'p':
		Black += 1
if White > Black:
	print('White')
elif White < Black:
	print('Black')
else:
	print('Draw')


v = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
white = 0
black = 0
from collections import Counter
for i in range(8):
	m = input()
	c = Counter(m)
	for j in c:
		if j.lower() in v:
			if j.islower():
				black += v[j.lower()] * c[j]
			elif j.isupper():
				white += v[j.lower()] * c[j]
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


w = b = 0
dic = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
for _ in range(8):
	for i in input():
		if i.islower():
			b += dic.get(i, 0)
		else:
			w += dic.get(i.lower(), 0)
print('White' if w > b else 'Black' if w < b else 'Draw')


sums = 0
sum = 0
for i in range(8):
	s = str(input())
	for j in range(0, len(s)):
		if s[j].isupper():
			if s[j] == 'Q':
				sums = sums + 9
			elif s[j] == 'R':
				sums = sums + 5
			elif s[j] == 'B':
				sums = sums + 3
			elif s[j] == 'N':
				sums = sums + 3
			elif s[j] == 'P':
				sums = sums + 1
		elif s[j].islower():
			if s[j] == 'q':
				sum = sum + 9
			elif s[j] == 'r':
				sum = sum + 5
			elif s[j] == 'b':
				sum = sum + 3
			elif s[j] == 'n':
				sum = sum + 3
			elif s[j] == 'p':
				sum = sum + 1
if sum == sums:
	print('Draw')
elif sum > sums:
	print('Black')
else:
	print('White')


pieces = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
white = 0
black = 0
for _ in range(8):
	row = input()
	for e in row:
		if e == '.' or e.lower() == 'k':
			continue
		if e == e.lower():
			black += pieces[e]
		else:
			white += pieces[e.lower()]
if white > black:
	print('White')
elif black > white:
	print('Black')
else:
	print('Draw')


t = 0
t2 = 0
l = 8 * ['']
for i in range(8):
	l[i] = input()
for i in range(8):
	for j in range(8):
		ch = l[i][j]
		if ch.lower() == ch:
			if ch == 'q':
				t = t + 9
			if ch == 'r':
				t = t + 5
			if ch == 'b':
				t = t + 3
			if ch == 'n':
				t = t + 3
			if ch == 'p':
				t = t + 1
		if ch.upper() == ch:
			ch = ch.lower()
			if ch == 'q':
				t2 = t2 + 9
			if ch == 'r':
				t2 = t2 + 5
			if ch == 'b':
				t2 = t2 + 3
			if ch == 'n':
				t2 = t2 + 3
			if ch == 'p':
				t2 = t2 + 1
if t > t2:
	print('Black')
if t == t2:
	print('Draw')
if t < t2:
	print('White')