private static Direction directionFromWord(String direction) {
		switch(direction.charAt(0)) {
			case 'd': return Direction.BELOW;
			case 'u': return Direction.ABOVE;
			case 'r': return Direction.RIGHT;
			case 'l': return Direction.LEFT;
			default: throw new AssertionError("Unexpected input direction.");
		}
	}