
def add(x,y): # simulates addition in 32-bit integers
  result = (x+y) % (2**32)
  if result >= 2**31: result -= 2**32
  return result

def magic(x):
  foo = 0
  while x > 1:
    y = 2
    while True:
      if y==x: return foo <= 0
      if magic(y) and x%y==0:
        x /= y
        foo = add(foo,1)
        break
      y = add(y,1)
  return True

where = -7
step = 2
best = where
while step != 0:
  where = add(where,step)
  if where < best:
    best = where
    print '*'
  if not magic(where): break
