#include #include #include #include #include #include #include #include #include #include #include #include #define m_p make_pair #define p_b push_back #define fi first #define se second #define LL long long using namespace std; const int maxn=10000010; char s[maxn]; int b[10],a[maxn]; int main() { //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); int tt,cas=0; scanf("%d\n",&tt); while (tt--) { gets(s); memset(b,0,sizeof(b)); memset(a,0,sizeof(a)); int n=strlen(s); if (n==1) { printf("Uncertain\n"); continue; } int m=0; for (int i=0; i9) { a[i+1]+=a[i] / 10; a[i]=a[i] % 10; } } if (a[len+1]) len++; for (int i=len; i>=1; i--) printf("%d",a[i]); printf("\n"); } return 0; }