from errno import EEXIST
from os.path import split
from os import makedirs
def bfs11304(path):
  bfs11301 = []
  while True:
    (path, bfs11302) = split(path)
    if (bfs11302 != ''):
      bfs11301.append(bfs11302)
    else:
      if (path != ''):
        bfs11301.append(path)

      break


  return list(reversed(bfs11301))

def bfs11303(path):
  try:
    makedirs(path)
  except OSError as exception:
    if (exception.errno != EEXIST):
      raise 



