I thought how unpleasant

I thought how unpleasant it is to be locked out; and I thought how it is worse, perhaps, to be locked in.