#include <bits/stdc++.h> using namespace std ; int main() { puts("12\n9709\n96\n109\n108\n") ; return 0 ; }