#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
using pii = pair<long long, long long>;
const long long mod = 1000000007;
long long modpow(long long x, long long p) {
  long long ret = 1, piv = x;
  while (p) {
    if (p & 1) ret = ret * piv % mod;
    piv = piv * piv % mod;
    p >>= 1;
  }
  return ret;
}
long long fact[1050];
long long perm(long long a, long long b) {
  if (b > a) return 0;
  long long d1 = fact[a];
  long long d2 = modpow(fact[a - b], mod - 2);
  return (d1 * d2) % mod;
}
long long search(long long x, long long n, long long pos) {
  long long a, b, c;
  a = b = c = 0;
  long long left = 0, right = n;
  while (left < right) {
    long long mid = (left + right) / 2;
    if (mid <= pos) {
      if (mid < pos) a++;
      left = mid + 1;
    } else {
      right = mid;
      b++;
    }
  }
  c = n - 1 - a - b;
  long long res = 1;
  res *= perm(x - 1, a);
  res %= mod;
  res *= perm(n - x, b);
  res %= mod;
  res *= fact[c];
  res %= mod;
  return res;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, x, pos;
  cin >> n >> x >> pos;
  fact[1] = 1;
  fact[0] = 1;
  for (long long i = 2; i <= 1040; i++) fact[i] = (fact[i - 1] * i) % mod;
  cout << search(x, n, pos);
}
