You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right

Input: Consider Input: [15, 67, 9, 42, 92, 82, 37, 87, 64, 12]

Output: 2


Input: Consider Input: [6, 62, 90, 10, 27, 71, 40, 67, 64, 47]

Output: 2


Input: Consider Input: [12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152]


Output: 1