def task_9_3():
def treug(i,a,b,c,d,e):
n=0
m=0
a()
while not i():
fill_cell()
n+=1
a()
b((n//2)+1)
c()
fill_cell()
m=n
if n-2>2:
while True:
if (n-3)/2==1:
b()
else:
b((n-3)/2)
for i in range(n-2):
fill_cell()
a()
b(((n-3)//2)+1)
n-=2
if n-2>2:
c()
else:
c()
fill_cell()
break
c()
for i in range((m//2)+1):
d()
e()
treug(wall_is_beneath,move_down,move_up,move_right,move_up,move_right)
treug(wall_is_beneath,move_down,move_up,move_left,move_up,move_left)
treug(wall_is_on_the_right,move_right,move_left,move_down,move_down,move_right)
treug(wall_is_on_the_left,move_left,move_right,move_up,move_down,move_left)