def walk(dir):
dirs = []
for name in os.listdir(dir):
path = os.path.join(dir, name)
if os.path.isfile(path):
dirs.append(path)
else:
dirs.extend(walk(path))
return dirs
ZGVmIHdhbGsoZGlyKToKICAgIGRpcnMgPSBbXQogICAgZm9yIG5hbWUgaW4gb3MubGlzdGRpcihkaXIpOgogICAgICAgIHBhdGggPSBvcy5wYXRoLmpvaW4oZGlyLCBuYW1lKQogICAgICAgIGlmIG9zLnBhdGguaXNmaWxlKHBhdGgpOgogICAgICAgICAgICBkaXJzLmFwcGVuZChwYXRoKQogICAgICAgIGVsc2U6CiAgICAgICAgICAgIGRpcnMuZXh0ZW5kKHdhbGsocGF0aCkpCiAgICByZXR1cm4gZGlycw==