#include <bits/stdc++.h>
int diru[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dirv[] = {-1, 0, 1, -1, 1, -1, 0, 1};
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
template <class T>
T sq(T n) {
  return n * n;
}
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
template <class T>
bool inside(T a, T b, T c) {
  return a <= b && b <= c;
}
template <class T>
void setmax(T& a, T b) {
  if (a < b) a = b;
}
template <class T>
void setmin(T& a, T b) {
  if (b < a) a = b;
}
template <class T>
T power(T N, T P) {
  return (P == 0) ? 1 : N * power(N, P - 1);
}
long long int dp[100010][2][2];
bool isV[100010][2][2];
char A[100010];
char B[100010];
int n;
long long int M = 1000000007;
long long int cal(int i, int f1, int f2) {
  if (i == n) return f1 & f2;
  if (isV[i][f1][f2]) return dp[i][f1][f2];
  long long int ret = 0, j;
  if (A[i] == '?') {
    for (j = 0; j < 10; j++) {
      if (B[i] == '?') {
        ret += j * cal(i + 1, 1, f2);
        ret += (9LL - j) * cal(i + 1, f1, 1);
        ret += cal(i + 1, f1, f2);
      } else
        ret += cal(i + 1, f1 | (j > B[i] - '0'), f2 | (j < B[i] - '0'));
    }
  } else if (B[i] == '?') {
    for (j = 0; j < 10; j++) {
      ret += cal(i + 1, f1 | (j < A[i] - '0'), f2 | (j > A[i] - '0'));
    }
  } else
    ret += cal(i + 1, f1 | (A[i] - '0' > B[i] - '0'),
               f2 | (A[i] - '0' < B[i] - '0'));
  ret %= M;
  isV[i][f1][f2] = 1;
  return dp[i][f1][f2] = ret;
}
int main() {
  int T, t = 1, m, i, j, k;
  scanf("%d", &n);
  scanf("%s", A);
  scanf("%s", B);
  cout << cal(0, 0, 0) << endl;
  return 0;
}
