#include <bits/stdc++.h>
using namespace std;
const long long N = 1228;
const long long M = 1e9 + 7;
long long bpm(long long a, long long b) {
  a %= M;
  if (b == 0) return 1;
  if (b == 1) return a;
  if (b % 2 == 0)
    return bpm(a * a, b >> 1);
  else
    return (a * bpm(a * a, b >> 1)) % M;
}
long long f[N], of[N];
long long ank(long long n, long long k) {
  long long r = f[n];
  r = (r * of[n - k]) % M;
  return r;
}
char a[N];
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  f[0] = 1;
  for (long long i = 1; i < N; i++) f[i] = (f[i - 1] * i) % M;
  of[N - 1] = bpm(f[N - 1], M - 2);
  for (long long i = N - 2; i >= 0; i--) of[i] = (of[i + 1] * (i + 1)) % M;
  of[0] = 1;
  long long n, x, pos;
  cin >> n >> x >> pos;
  long long l = 0, r = n;
  long long c[3] = {0, 0, 0};
  while (l < r) {
    long long m = (l + r) >> 1;
    if (pos >= m) {
      a[m] = 1;
      l = m + 1;
    } else {
      a[m] = 2;
      r = m;
    }
  }
  c[a[pos]]--;
  for (long long i = 0; i < n; i++) c[a[i]]++;
  long long res = 1;
  if (c[1] > x - 1)
    res = 0;
  else
    res = ank(x - 1, c[1]);
  if (c[2] > n - x)
    res = 0;
  else
    res = (res * ank(n - x, c[2])) % M;
  res = (res * f[c[0]]) % M;
  cout << res;
}
