#include <bits/stdc++.h>
using namespace std;
const long double ZERO = 1e-15;
const long double EPS = 1e-10;
const long long MAXN = 100500;
const long long INF9 = 2 * 1e9;
const long long INF = 4 * 1e18;
const long long L0 = 0;
const long double PI = acos(-1);
const long double sq2 = sqrt(2.0);
const long long MOD = 1e9 + 7;
int main() {
  {
    ios::sync_with_stdio(NULL);
    cin.tie(NULL);
    cout.tie(NULL);
  }
  long long n;
  cin >> n;
  long long x;
  cin >> x;
  long long pos;
  cin >> pos;
  long long l = 0;
  long long r = n;
  long long m;
  long long less = 0;
  long long more = 0;
  long long now_less = x - 1;
  long long now_more = n - x;
  long long ans = 1;
  long long cnt = 0;
  while (l < r) {
    m = (l + r) / 2;
    if (m < pos) {
      ans *= now_less--;
      ans %= MOD;
      l = m + 1;
    }
    if (m > pos) {
      ans *= now_more--;
      ans %= MOD;
      r = m;
    }
    if (m == pos) l = m + 1;
    cnt++;
  }
  if (l - 1 != pos)
    cout << 0;
  else {
    long long t = n - cnt;
    while (t) {
      ans *= t--;
      ans %= MOD;
    }
    cout << ans;
  }
  return 0;
}
