Let n be an integer. We define a function f(n) which returns the cube of sum of digits of n.
You are given two integers n and k. You have to find the value of the integer that is returned when the function is recursively applied k times on n.
Formally, you have to find the value of fk(n).
Input format
Output format
The output should consist of T lines each containing a single integer corresponding to the required value fk(n).
Constraints
1≤T≤1061≤n,k≤1015
The Sum of digits of 3 is 3.
The Sum of digits of 27 is 9.