import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main
(String args
[]) { int[] input,output;
input = new int[10000];
output = new int[10000];
int iL,oL;
Scanner cin
= new Scanner
(System.
in); int n = cin.nextInt();
int cases = n;
while (n > 0) {
if(n == cases)
;
else
n--;
iL = 0; oL = 0;
if(tmp.length()%2==1) {
input[0] = tmp.charAt(0)-48;
iL++;
for(int j=1;j<tmp.length();iL++,j++) {
input[iL] = tmp.charAt(j)-48;
input[iL] = input[iL]*10 + (tmp.charAt(j+1)-48);
j++;
}
}
else {
for(int j=0;j<tmp.length();iL++,j++) {
input[iL] = tmp.charAt(j)-48;
input[iL] = input[iL]*10 + (tmp.charAt(j+1)-48);
j++;
}
}
/*for(int j=0;j<iL;j++) {
System.out.print(input[j]); //check input
System.out.print(" ");
}*/
for(int j=0;j<iL;j++) {
for(int k=9;k>=0;k--) {
if(cmp.compareTo(rem) < 1) {
rem = rem.subtract(cmp);
//cout << "debug : " << mul*10+k << " " << rem << " ";
//cout << mul << endl;
output[oL] = k;
oL++;
break;
}
}
}
for(int j
=0;j
<oL
;j
++) System.
out.
print(output
[j
]); //check output } //one case ends here
}
}
aW1wb3J0IGphdmEubWF0aC5CaWdJbnRlZ2VyOwppbXBvcnQgamF2YS51dGlsLlNjYW5uZXI7CiAKcHVibGljIGNsYXNzIE1haW4gewogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nIGFyZ3NbXSkgewoJCWludFtdIGlucHV0LG91dHB1dDsKCQlpbnB1dCA9IG5ldyBpbnRbMTAwMDBdOwoJCW91dHB1dCA9IG5ldyBpbnRbMTAwMDBdOwoJCWludCBpTCxvTDsKCQlCaWdJbnRlZ2VyIG11bCxyZW07CgkJCgkJU2Nhbm5lciBjaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWludCBuID0gY2luLm5leHRJbnQoKTsKCQlpbnQgY2FzZXMgPSBuOwoJCXdoaWxlIChuID4gMCkgewoJCQlpZihuID09IGNhc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