A pigeon was shocked every time it landed on the telephone wire. After a few times of this, the pigeon learned not to land on the wire. It learned this by _____.