#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int n, len;
char a[100005], b[100005];
inline bool isdigit(char s) { return ('0' <= s && s <= '9'); }
void swapit() {
  for (int i = 0; i < n; i++) {
    int t = a[i];
    a[i] = b[i];
    b[i] = t;
  }
}
int main() {
  scanf("%d", &n);
  scanf("%s%s", a, b);
  int l = 0, r = 0;
  for (int i = 0; i < n; i++) {
    if (isdigit(a[i]) && isdigit(b[i])) {
      if (a[i] < b[i])
        l++;
      else if (a[i] > b[i])
        r++;
    }
  }
  long long ans = 1;
  if (l > 0 && r > 0) {
    for (int i = 0; i < n; i++) {
      if (!isdigit(a[i]) && !isdigit(b[i])) {
        ans *= 100;
        ans %= mod;
      } else if (!isdigit(a[i]) || !isdigit(b[i])) {
        ans *= 10;
        ans %= mod;
      }
    }
    cout << ans << endl;
  } else if (l > 0 || r > 0) {
    if (r > 0) swapit();
    long long sum = 1, cur1 = 1;
    for (int i = 0; i < n; i++) {
      if (!isdigit(a[i]) && !isdigit(b[i])) {
        sum *= 100;
        sum %= mod;
        cur1 *= 55;
        cur1 %= mod;
      } else if (!isdigit(a[i]) || !isdigit(b[i])) {
        sum *= 10;
        sum %= mod;
        if (isdigit(a[i])) {
          cur1 *= 10 - (a[i] - '0');
          cur1 %= mod;
        } else {
          cur1 *= (b[i] - '0') + 1;
          cur1 %= mod;
        }
      }
    }
    ans = (long long)10 * mod + sum - cur1;
    ans %= mod;
    cout << ans << endl;
  } else {
    long long cur1 = 1, cur2 = 1, cur3 = 1;
    long long sum = 1;
    for (int i = 0; i < n; i++) {
      if (!isdigit(a[i]) && !isdigit(b[i])) {
        sum *= 100;
        sum %= mod;
        cur1 *= 55;
        cur1 %= mod;
        cur2 *= 55;
        cur2 %= mod;
        cur3 *= 10;
        cur3 %= mod;
      } else if (!isdigit(a[i]) || !isdigit(b[i])) {
        sum *= 10;
        sum %= mod;
        if (isdigit(a[i])) {
          cur1 *= 10 - (a[i] - '0');
          cur1 %= mod;
          cur2 *= (a[i] - '0') + 1;
          cur2 %= mod;
        } else {
          cur1 *= (b[i] - '0') + 1;
          cur1 %= mod;
          cur2 *= 10 - (b[i] - '0');
          cur2 %= mod;
        }
      }
    }
    ans = (long long)10 * mod + sum - cur1 - cur2 + cur3;
    ans %= mod;
    cout << ans << endl;
  }
  return 0;
}
