LearnPy Hub
← Arena
IntermediateRating 1100

Tic-Tac-Toe Result

Given a finished 3×3 board of X, O and ., print X or O if that player has three in a row, otherwise DRAW. At most one player wins.

Input

Three lines.

Output

X, O or DRAW.

Sample 1

Input
XXX
OO.
...
Output
X

Sample 2

Input
XOX
XOO
OXX
Output
DRAW
solution.py
Output appears here
Tic-Tac-Toe Result · Python Arena problem · LearnPy Hub