#include <bits/stdc++.h>
using namespace std;
char alphz[27] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                  'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                  's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
float Euclidean(long long x1, long long x2, long long y1, long long y2) {
  return sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
}
long long GCD(long long a, long long b) { return !b ? a : GCD(b, a % b); }
long long LCM(long long a, long long b) { return (a * b) / GCD(a, b); }
void PrimeFactor(long long n) {
  while (n % 2 == 0) {
    n /= 2;
  }
  for (int i = 3; i <= sqrt(n); i += 2) {
    if (n % i == 0) {
      n /= i;
    }
  }
  if (n > 2) {
  };
}
bool Is_Square(long long x) {
  long long l = 0, r = x;
  while (l <= r) {
    long long mid = l + (r - l) / 2;
    if (mid * mid == x) return true;
    if (mid * mid > x)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return false;
}
long long Power(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = Power(x, y / 2);
  if (y % 2 == 0)
    return (temp * temp);
  else
    return (x * temp * temp);
}
bool Is_Prime(int x) {
  if (x == 2)
    return 1;
  else if (x % 2 == 0 || x < 2)
    return 0;
  for (int i = 3; i * i <= x; i += 2)
    if (x % i == 0) return 0;
  return 1;
}
bool Is_Palin(string s) {
  int i = 0, j = (int)s.size() - 1;
  while (i < j) {
    if (s[i] != s[j]) return 0;
    i++, j--;
  }
  return 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n < 10) {
      cout << n << '\n';
      continue;
    }
    long long ans = 0;
    int rem = n % 10;
    n -= rem;
    int cnt = 0;
    int start = 1e9;
    while (n > 0) {
      if (n % start == 0) {
        ans += n;
        n = n / 10;
        n += rem;
        rem = n % 10;
        n -= rem;
      } else
        start /= 10;
    }
    cout << ans + rem << '\n';
  }
  return 0;
}

### Prompt

Please provide a Cpp coded solution to the problem described below:

Mishka wants to buy some food in the nearby shop. Initially, he has s burles on his card. 

Mishka can perform the following operation any number of times (possibly, zero): choose some positive integer number 1 ≤ x ≤ s, buy food that costs exactly x burles and obtain ⌊x/10⌋ burles as a cashback (in other words, Mishka spends x burles and obtains ⌊x/10⌋ back). The operation ⌊a/b⌋ means a divided by b rounded down.

It is guaranteed that you can always buy some food that costs x for any possible value of x.

Your task is to say the maximum number of burles Mishka can spend if he buys food optimally.

For example, if Mishka has s=19 burles then the maximum number of burles he can spend is 21. Firstly, he can spend x=10 burles, obtain 1 burle as a cashback. Now he has s=10 burles, so can spend x=10 burles, obtain 1 burle as a cashback and spend it too.

You have to answer t independent test cases.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 10^4) — the number of test cases.

The next t lines describe test cases. Each test case is given on a separate line and consists of one integer s (1 ≤ s ≤ 10^9) — the number of burles Mishka initially has.

Output

For each test case print the answer on it — the maximum number of burles Mishka can spend if he buys food optimally.

Example

Input


6
1
10
19
9876
12345
1000000000


Output


1
11
21
10973
13716
1111111111

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
char alphz[27] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                  'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                  's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
float Euclidean(long long x1, long long x2, long long y1, long long y2) {
  return sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
}
long long GCD(long long a, long long b) { return !b ? a : GCD(b, a % b); }
long long LCM(long long a, long long b) { return (a * b) / GCD(a, b); }
void PrimeFactor(long long n) {
  while (n % 2 == 0) {
    n /= 2;
  }
  for (int i = 3; i <= sqrt(n); i += 2) {
    if (n % i == 0) {
      n /= i;
    }
  }
  if (n > 2) {
  };
}
bool Is_Square(long long x) {
  long long l = 0, r = x;
  while (l <= r) {
    long long mid = l + (r - l) / 2;
    if (mid * mid == x) return true;
    if (mid * mid > x)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return false;
}
long long Power(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = Power(x, y / 2);
  if (y % 2 == 0)
    return (temp * temp);
  else
    return (x * temp * temp);
}
bool Is_Prime(int x) {
  if (x == 2)
    return 1;
  else if (x % 2 == 0 || x < 2)
    return 0;
  for (int i = 3; i * i <= x; i += 2)
    if (x % i == 0) return 0;
  return 1;
}
bool Is_Palin(string s) {
  int i = 0, j = (int)s.size() - 1;
  while (i < j) {
    if (s[i] != s[j]) return 0;
    i++, j--;
  }
  return 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n < 10) {
      cout << n << '\n';
      continue;
    }
    long long ans = 0;
    int rem = n % 10;
    n -= rem;
    int cnt = 0;
    int start = 1e9;
    while (n > 0) {
      if (n % start == 0) {
        ans += n;
        n = n / 10;
        n += rem;
        rem = n % 10;
        n -= rem;
      } else
        start /= 10;
    }
    cout << ans + rem << '\n';
  }
  return 0;
}

```