#include<stdio.h> #include<iostream> using namespace std; int main(){ cout<<12<<endl<<9709<<endl<<96<<endl<<109<<endl<<108; }