Coulomb-blockade oscillations in quantum wires and dots