A palindrome is a word that reads the same forwards and backward. A string is given, find the minimum number of characters to insert to convert it to a palindrome.

Write a function `solve`

that have the following parameter(s):

1.) *a = string*

**Example**

Input:

There is a string given:

`a = ap`

Output:

The function will return,

`1`

**Explanation**

We can make " ap" palindrome as `"pap"`

by adding "p" at the front.

So, the minimum number of characters to insert is "1".

**Constraints**

• The size of the string will be greater than or equal to 1 and less than or equal to 40.