Inflation rate
In today's world, economic indicators significantly impact everyone's life. Consider two prices: the actual price and the forecasted price. Typically, the actual price exceeds the forecasted price; if it doesn't, the inflation rate is deemed negative. We define the critical level of forecast inflation as the maximum difference obtained by cyclically permuting the digits of one number and comparing it to a cyclic permutation of the digits of the other number. Your task is to find this maximum difference, ensuring that no leading zeros appear in the number representations.
Input
The first line contains the actual price, denoted as number A, and the second line contains the forecasted price, denoted as number B. Each number can have up to 3000 digits.
Output
Output the greatest critical level of inflation.