Ordering three-digit numbers