#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void __print(int32_t x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  long long f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
char myHeap[200 * 1024 * 1024];
long long sz = 0;
void assert_tle(bool q) {
  while (!q)
    ;
}
void *operator new(std::size_t count) {
  sz += count;
  assert_tle(sz <= 200 * 1024 * 1024);
  return myHeap + sz - count;
}
void operator delete(void *ptr) {}
void fastIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
bool isprime(long long n) {
  for (long long i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return false;
  }
  return true;
}
long long factorial(long long n) {
  if (n == 0) return 1;
  long long p = factorial(n - 1) * n;
  p %= 1000000007;
  return p;
}
void solve() {
  long long n, x, pos;
  cin >> n >> x >> pos;
  long long smaller = x - 1;
  long long greater = n - x;
  long long left = 0;
  long long right = n;
  long long ans = 1;
  while (left < right) {
    long long mid = (left + right) / 2;
    if (mid <= pos) {
      left = mid + 1;
      if (mid != pos) ans *= smaller--;
    } else {
      right = mid;
      ans *= greater--;
    }
    ans %= 1000000007;
  }
  ans *= factorial(smaller + greater);
  ans %= 1000000007;
  cout << ans;
}
int32_t main() {
  fastIO();
  { solve(); }
  return 0;
}
