# python code
import random;
import time;
import os;
steps=50;
start=0;
currentPos=start+steps;
for cntr in range(steps):
stateStr="";
for i in range(2*steps):
if i == currentPos:
stateStr = stateStr + "0";
else:
stateStr = stateStr + "-";
# move to left or right with a probability of half
os.system('clear');
print stateStr;
rnd = random.randint(0,1);
if rnd == 0:
currentPos -= 1;
else:
currentPos += 1;
time.sleep(1);