#include <bits/stdc++.h>
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
template <class T>
using vec = std::vector<T>;
template <class T>
using vec2d = std::vector<std::vector<T>>;
template <class T>
vec2d<T> makeVec2d(const int n1, const int n2) {
  return vec2d<T>(n1, vec<T>(n2));
}
bool __hack = std::ios::sync_with_stdio(false);
auto __hack1 = cin.tie(nullptr);
struct Input {
  Input(istream &in) : in(&in) {}
  template <class T>
  T next() const {
    T x;
    *in >> x;
    return x;
  }
  int ni() const { return next<int>(); }
  istream *in;
};
Input in(cin);
class Output {
 private:
  ostream *out;
  template <typename T>
  void printSingle(const T &value) {
    *out << value;
  }

 public:
  Output(ostream &out) : out(&out) {}
  inline void print() {}
  template <typename T, typename... Ts>
  inline void print(const T &f, const Ts &...args) {
    printSingle(f);
    if (sizeof...(args) != 0) {
      *out << ' ';
      print(args...);
    }
  }
  template <typename... Ts>
  inline void println(const Ts &...args) {
    print(args...);
    (*out) << '\n';
  }
  template <typename... Ts>
  inline void operator()(const Ts &...args) {
    println(args...);
  }
};
Output out(cout);
namespace template_util {
constexpr int bytecount(uint64_t x) { return x ? 1 + bytecount(x >> 8) : 0; }
template <int N>
struct bytetype {};
template <uint64_t N>
struct minimal_uint : bytetype<bytecount(N)> {};
}  // namespace template_util
template <typename T, typename C, T Modulus>
class MR {
 private:
  struct tag_plus {};
  struct tag_minus {};
  struct tag_good {};
  static_assert(std::numeric_limits<C>::max() / Modulus / Modulus > 0,
                "compute type is too small");
  static_assert(Modulus < std::numeric_limits<T>::max() / 2,
                "storage type is too small");
  static constexpr T reduce(T value, tag_plus) {
    return value >= Modulus ? value - Modulus : value;
  }
  static constexpr T reduce(T value, tag_minus) {
    return value < 0 ? value + Modulus : value;
  }
  static constexpr T reduce(T value, tag_good) { return value; }

 public:
  T value;
  constexpr MR() : value(0) {}
  constexpr MR(C value) : value(reduce(value % Modulus, tag_minus())) {}
  template <typename tag_t>
  constexpr MR(T value, tag_t tag) : value(reduce(value, tag)) {}
  constexpr MR operator+(MR b) const { return MR(value + b.value, tag_plus()); }
  constexpr MR operator*(MR b) const {
    return MR(C(value) * C(b.value) % Modulus, tag_good());
  }
  constexpr T get() const { return value; }
};
template <typename T, typename C, T Modulus>
static inline std::ostream &operator<<(std::ostream &o, MR<T, C, Modulus> mr) {
  return o << mr.get();
}
template <class T>
vector<T> getFactorials(int n) {
  vector<T> res(n);
  res[0] = T(1);
  for (int i = 1; i < n; ++i) {
    res[i] = res[i - 1] * i;
  }
  return res;
}
template <typename T>
vec2d<T> getC(int n) {
  vec2d<T> C = makeVec2d<T>(n, n);
  for (int i = 0; i < (n); ++i) {
    C[i] = vector<T>(n, T(0));
    for (int j = 0; j < (i + 1); ++j) {
      if (j == 0 || j == i) {
        C[i][j] = T(1);
      } else {
        C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]);
      }
    }
  }
  return C;
}
using md = MR<int, int64_t, 1000000007>;
int n, x, pos;
void solve(istream &inStream, ostream &outStream) {
  in = Input(inStream);
  out = Output(outStream);
  n = in.ni();
  x = in.ni();
  pos = in.ni();
  int left = 0, right = n;
  vec<pair<int, int>> positions;
  while (left < right) {
    int mid = (left + right) / 2;
    if (pos == mid) {
      left = mid + 1;
      positions.push_back({mid, 0});
    } else if (pos > mid) {
      left = mid + 1;
      positions.push_back({mid, 1});
    } else {
      right = mid;
      positions.push_back({mid, -1});
    }
  };
  ;
  int countSmaller = 0, countBigger = 0;
  for (int i = 0; i < (positions.size()); ++i) {
    if (positions[i].second == 1) {
      ++countSmaller;
    } else if (positions[i].second == -1) {
      ++countBigger;
    }
  }
  int freePos = n - (int)positions.size();
  auto C = getC<md>(n + 1);
  auto f = getFactorials<md>(n + 1);
  ;
  ;
  ;
  ;
  ;
  ;
  md res = C[x - 1][countSmaller] * C[n - x][countBigger] * f[freePos] *
           f[countSmaller] * f[countBigger];
  out(res);
}
int main() {
  solve(cin, cout);
  return 0;
}

### Prompt

In cpp, your task is to solve the following problem:

Andrey thinks he is truly a successful developer, but in reality he didn't know about the binary search algorithm until recently. After reading some literature Andrey understood that this algorithm allows to quickly find a certain number x in an array. For an array a indexed from zero, and an integer x the pseudocode of the algorithm is as follows:

<image>

Note that the elements of the array are indexed from zero, and the division is done in integers (rounding down).

Andrey read that the algorithm only works if the array is sorted. However, he found this statement untrue, because there certainly exist unsorted arrays for which the algorithm find x!

Andrey wants to write a letter to the book authors, but before doing that he must consider the permutations of size n such that the algorithm finds x in them. A permutation of size n is an array consisting of n distinct integers between 1 and n in arbitrary order.

Help Andrey and find the number of permutations of size n which contain x at position pos and for which the given implementation of the binary search algorithm finds x (returns true). As the result may be extremely large, print the remainder of its division by 10^9+7.

Input

The only line of input contains integers n, x and pos (1 ≤ x ≤ n ≤ 1000, 0 ≤ pos ≤ n - 1) — the required length of the permutation, the number to search, and the required position of that number, respectively.

Output

Print a single number — the remainder of the division of the number of valid permutations by 10^9+7.

Examples

Input


4 1 2


Output


6


Input


123 42 24


Output


824071958

Note

All possible permutations in the first test case: (2, 3, 1, 4), (2, 4, 1, 3), (3, 2, 1, 4), (3, 4, 1, 2), (4, 2, 1, 3), (4, 3, 1, 2).

### Response

```cpp
#include <bits/stdc++.h>
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
template <class T>
using vec = std::vector<T>;
template <class T>
using vec2d = std::vector<std::vector<T>>;
template <class T>
vec2d<T> makeVec2d(const int n1, const int n2) {
  return vec2d<T>(n1, vec<T>(n2));
}
bool __hack = std::ios::sync_with_stdio(false);
auto __hack1 = cin.tie(nullptr);
struct Input {
  Input(istream &in) : in(&in) {}
  template <class T>
  T next() const {
    T x;
    *in >> x;
    return x;
  }
  int ni() const { return next<int>(); }
  istream *in;
};
Input in(cin);
class Output {
 private:
  ostream *out;
  template <typename T>
  void printSingle(const T &value) {
    *out << value;
  }

 public:
  Output(ostream &out) : out(&out) {}
  inline void print() {}
  template <typename T, typename... Ts>
  inline void print(const T &f, const Ts &...args) {
    printSingle(f);
    if (sizeof...(args) != 0) {
      *out << ' ';
      print(args...);
    }
  }
  template <typename... Ts>
  inline void println(const Ts &...args) {
    print(args...);
    (*out) << '\n';
  }
  template <typename... Ts>
  inline void operator()(const Ts &...args) {
    println(args...);
  }
};
Output out(cout);
namespace template_util {
constexpr int bytecount(uint64_t x) { return x ? 1 + bytecount(x >> 8) : 0; }
template <int N>
struct bytetype {};
template <uint64_t N>
struct minimal_uint : bytetype<bytecount(N)> {};
}  // namespace template_util
template <typename T, typename C, T Modulus>
class MR {
 private:
  struct tag_plus {};
  struct tag_minus {};
  struct tag_good {};
  static_assert(std::numeric_limits<C>::max() / Modulus / Modulus > 0,
                "compute type is too small");
  static_assert(Modulus < std::numeric_limits<T>::max() / 2,
                "storage type is too small");
  static constexpr T reduce(T value, tag_plus) {
    return value >= Modulus ? value - Modulus : value;
  }
  static constexpr T reduce(T value, tag_minus) {
    return value < 0 ? value + Modulus : value;
  }
  static constexpr T reduce(T value, tag_good) { return value; }

 public:
  T value;
  constexpr MR() : value(0) {}
  constexpr MR(C value) : value(reduce(value % Modulus, tag_minus())) {}
  template <typename tag_t>
  constexpr MR(T value, tag_t tag) : value(reduce(value, tag)) {}
  constexpr MR operator+(MR b) const { return MR(value + b.value, tag_plus()); }
  constexpr MR operator*(MR b) const {
    return MR(C(value) * C(b.value) % Modulus, tag_good());
  }
  constexpr T get() const { return value; }
};
template <typename T, typename C, T Modulus>
static inline std::ostream &operator<<(std::ostream &o, MR<T, C, Modulus> mr) {
  return o << mr.get();
}
template <class T>
vector<T> getFactorials(int n) {
  vector<T> res(n);
  res[0] = T(1);
  for (int i = 1; i < n; ++i) {
    res[i] = res[i - 1] * i;
  }
  return res;
}
template <typename T>
vec2d<T> getC(int n) {
  vec2d<T> C = makeVec2d<T>(n, n);
  for (int i = 0; i < (n); ++i) {
    C[i] = vector<T>(n, T(0));
    for (int j = 0; j < (i + 1); ++j) {
      if (j == 0 || j == i) {
        C[i][j] = T(1);
      } else {
        C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]);
      }
    }
  }
  return C;
}
using md = MR<int, int64_t, 1000000007>;
int n, x, pos;
void solve(istream &inStream, ostream &outStream) {
  in = Input(inStream);
  out = Output(outStream);
  n = in.ni();
  x = in.ni();
  pos = in.ni();
  int left = 0, right = n;
  vec<pair<int, int>> positions;
  while (left < right) {
    int mid = (left + right) / 2;
    if (pos == mid) {
      left = mid + 1;
      positions.push_back({mid, 0});
    } else if (pos > mid) {
      left = mid + 1;
      positions.push_back({mid, 1});
    } else {
      right = mid;
      positions.push_back({mid, -1});
    }
  };
  ;
  int countSmaller = 0, countBigger = 0;
  for (int i = 0; i < (positions.size()); ++i) {
    if (positions[i].second == 1) {
      ++countSmaller;
    } else if (positions[i].second == -1) {
      ++countBigger;
    }
  }
  int freePos = n - (int)positions.size();
  auto C = getC<md>(n + 1);
  auto f = getFactorials<md>(n + 1);
  ;
  ;
  ;
  ;
  ;
  ;
  md res = C[x - 1][countSmaller] * C[n - x][countBigger] * f[freePos] *
           f[countSmaller] * f[countBigger];
  out(res);
}
int main() {
  solve(cin, cout);
  return 0;
}

```