solve 22nd problem