What do snails octopuses and mussels breathe with lungs or gills?

i know that snails have gills i am not sure about the others