An AP consists of 37 terms . The sum of the three middle terms is 22 and the sum of the last three terms is 429 . Find the AP