#include <iostream>
using namespace std;
int main() {
int t;
cin >> t;
while(t--){
string s;
cin >> s;
int len = s.length();
int m=0;
for(int i=0; i<len; i++){
int t = s[i] - '0';
m = m*10 + t;
}
cout << m << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgdDsKCWNpbiA+PiB0OwoJd2hpbGUodC0tKXsKCQlzdHJpbmcgczsKCQljaW4gPj4gczsKCQlpbnQgbGVuID0gcy5sZW5ndGgoKTsKCQlpbnQgbT0wOwoJCWZvcihpbnQgaT0wOyBpPGxlbjsgaSsrKXsKCQkJaW50IHQgPSBzW2ldIC0gJzAnOwoJCQltID0gbSoxMCArIHQ7CgkJfQoJCWNvdXQgPDwgbSA8PCBlbmRsOwoJfQoJcmV0dXJuIDA7Cn0=