UPS of 2–30-atom carbon clusters: Chains and rings