#include <bits/stdc++.h>
using namespace std;
template <typename T>
void chkmax(T &x, T y) {
  x = x > y ? x : y;
}
template <typename T>
void chkmin(T &x, T y) {
  x = x > y ? y : x;
}
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  x *= f;
}
pair<int, int> f[110][1 << 11][2][2];
int a[110], pw[110];
long long l, r, K;
pair<int, int> dp(int pos, int s, bool lim, bool l, int tot) {
  if (tot > K) return make_pair(0, 0);
  if (pos == -1) return make_pair(!l, 0);
  if (f[pos][s][lim][l].first != -1) return f[pos][s][lim][l];
  int x = (lim) ? a[pos] : 9, s1 = 0, s2 = 0;
  for (int i = 0; i <= x; i++)
    if (!l) {
      pair<int, int> t = dp(pos - 1, s | (1 << i), lim && i == a[pos], l,
                            tot + ((s & (1 << i)) == 0));
      int tx = t.first, ty = t.second;
      s1 = (s1 + tx) % 998244353,
      s2 = (s2 + 1ll * i * pw[pos] % 998244353 * tx % 998244353) % 998244353,
      s2 = (s2 + ty) % 998244353;
    } else if (i == 0) {
      pair<int, int> t = dp(pos - 1, s, lim && i == a[pos], true, tot);
      int tx = t.first, ty = t.second;
      s1 = (s1 + tx) % 998244353, s2 = (s2 + ty) % 998244353;
    } else {
      pair<int, int> t =
          dp(pos - 1, s | (1 << i), lim && i == a[pos], false, tot + 1);
      int tx = t.first, ty = t.second;
      s1 = (s1 + tx) % 998244353,
      s2 = (s2 + 1ll * i * pw[pos] % 998244353 * tx % 998244353) % 998244353,
      s2 = (s2 + ty) % 998244353;
    }
  if (!lim && !l) f[pos][s][lim][l] = make_pair(s1, s2);
  return make_pair(s1, s2);
}
int solve(long long n) {
  int len = -1;
  long long x = n;
  while (x) a[++len] = x % 10, x /= 10;
  memset(f, -1, sizeof(f));
  pair<int, int> tmp = dp(len, 0, 1, 1, 0);
  return tmp.second;
}
int main() {
  read(l), read(r), read(K);
  pw[0] = 1;
  for (int i = 1; i <= 20; i++) pw[i] = 10ll * pw[i - 1] % 998244353;
  cout << (solve(r) - solve(l - 1) + 998244353) % 998244353 << "\n";
  return 0;
}

### Prompt

Please create a solution in CPP to the following problem:

You are given two integers l and r (l ≤ r). Your task is to calculate the sum of numbers from l to r (including l and r) such that each number contains at most k different digits, and print this sum modulo 998244353.

For example, if k = 1 then you have to calculate all numbers from l to r such that each number is formed using only one digit. For l = 10, r = 50 the answer is 11 + 22 + 33 + 44 = 110.

Input

The only line of the input contains three integers l, r and k (1 ≤ l ≤ r < 10^{18}, 1 ≤ k ≤ 10) — the borders of the segment and the maximum number of different digits.

Output

Print one integer — the sum of numbers from l to r such that each number contains at most k different digits, modulo 998244353.

Examples

Input

10 50 2


Output

1230


Input

1 2345 10


Output

2750685


Input

101 154 2


Output

2189

Note

For the first example the answer is just the sum of numbers from l to r which equals to (50 ⋅ 51)/(2) - (9 ⋅ 10)/(2) = 1230. This example also explained in the problem statement but for k = 1.

For the second example the answer is just the sum of numbers from l to r which equals to (2345 ⋅ 2346)/(2) = 2750685.

For the third example the answer is 101 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 121 + 122 + 131 + 133 + 141 + 144 + 151 = 2189.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
template <typename T>
void chkmax(T &x, T y) {
  x = x > y ? x : y;
}
template <typename T>
void chkmin(T &x, T y) {
  x = x > y ? y : x;
}
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  x *= f;
}
pair<int, int> f[110][1 << 11][2][2];
int a[110], pw[110];
long long l, r, K;
pair<int, int> dp(int pos, int s, bool lim, bool l, int tot) {
  if (tot > K) return make_pair(0, 0);
  if (pos == -1) return make_pair(!l, 0);
  if (f[pos][s][lim][l].first != -1) return f[pos][s][lim][l];
  int x = (lim) ? a[pos] : 9, s1 = 0, s2 = 0;
  for (int i = 0; i <= x; i++)
    if (!l) {
      pair<int, int> t = dp(pos - 1, s | (1 << i), lim && i == a[pos], l,
                            tot + ((s & (1 << i)) == 0));
      int tx = t.first, ty = t.second;
      s1 = (s1 + tx) % 998244353,
      s2 = (s2 + 1ll * i * pw[pos] % 998244353 * tx % 998244353) % 998244353,
      s2 = (s2 + ty) % 998244353;
    } else if (i == 0) {
      pair<int, int> t = dp(pos - 1, s, lim && i == a[pos], true, tot);
      int tx = t.first, ty = t.second;
      s1 = (s1 + tx) % 998244353, s2 = (s2 + ty) % 998244353;
    } else {
      pair<int, int> t =
          dp(pos - 1, s | (1 << i), lim && i == a[pos], false, tot + 1);
      int tx = t.first, ty = t.second;
      s1 = (s1 + tx) % 998244353,
      s2 = (s2 + 1ll * i * pw[pos] % 998244353 * tx % 998244353) % 998244353,
      s2 = (s2 + ty) % 998244353;
    }
  if (!lim && !l) f[pos][s][lim][l] = make_pair(s1, s2);
  return make_pair(s1, s2);
}
int solve(long long n) {
  int len = -1;
  long long x = n;
  while (x) a[++len] = x % 10, x /= 10;
  memset(f, -1, sizeof(f));
  pair<int, int> tmp = dp(len, 0, 1, 1, 0);
  return tmp.second;
}
int main() {
  read(l), read(r), read(K);
  pw[0] = 1;
  for (int i = 1; i <= 20; i++) pw[i] = 10ll * pw[i - 1] % 998244353;
  cout << (solve(r) - solve(l - 1) + 998244353) % 998244353 << "\n";
  return 0;
}

```