#include <math.h> int inv(int n){ if(n <= 9) return n; else return inv(n/10) + inv(n%10)*pow(10, n%10-1);}