Mechanical waves in simply and multiply connected thin-walled beams