You are given a phone number as an array of n digits. To help you memorize the number, you want to divide it into groups of contiguous digits. Each group must contain exactly 2 or 3 digits. There are 3 kinds of groups:
000 or 77.030, 229 or 166.123 or 90.The quality of a group assignment is defined as 2 × (number of excellent groups) + (number of good groups). Divide the phone number into groups such that the quality is maximized.