Second Order Logic and the Weak Exponential Hierarchies