def imprimir_lista(lista):
for elemento in lista:
if isinstance(elemento, list):
imprimir_lista(elemento)
else:
print(elemento)
lista = [1,2,3,4,5,[6,7,8,9],10,11,12,13,14,15]
imprimir_lista(lista)
ZGVmIGltcHJpbWlyX2xpc3RhKGxpc3RhKToKCWZvciBlbGVtZW50byBpbiBsaXN0YToKCQlpZiBpc2luc3RhbmNlKGVsZW1lbnRvLCBsaXN0KToKCQkJaW1wcmltaXJfbGlzdGEoZWxlbWVudG8pCgkJZWxzZToKCQkJcHJpbnQoZWxlbWVudG8pCgkJCQpsaXN0YSA9IFsxLDIsMyw0LDUsWzYsNyw4LDldLDEwLDExLDEyLDEzLDE0LDE1XQppbXByaW1pcl9saXN0YShsaXN0YSk=