#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long power(long long x, long long y, long long k) {
  if (y == 0) {
    return 1;
  }
  long long p = power(x, y / 2, k);
  if (y % 2 == 0) {
    return (p * p) % k;
  } else {
    return (p * p * x) % k;
  }
}
long long a = 1e9 + 7;
void solve() {
  long long n, x, pos;
  cin >> n >> x >> pos;
  long long p1 = x - 1, p2 = n - x;
  long long ans = 1;
  long long left = 0, right = n;
  while (left < right) {
    long long mid = (left + right) / 2;
    if (mid == pos) {
      left = mid + 1;
    } else if (mid < pos) {
      ans *= p1;
      ans = ans % a;
      p1--;
      left = mid + 1;
    } else {
      ans *= p2;
      ans = ans % a;
      p2--;
      right = mid;
    }
  }
  long long k = p1 + p2;
  while (k > 0) {
    ans *= k;
    ans = ans % a;
    k--;
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
