#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 1;
inline long long input(void) {
  char t;
  long long x = 0;
  int neg = 0;
  t = getchar();
  while ((t < 48 || t > 57) && t != '-') t = getchar();
  if (t == '-') {
    neg = 1;
    t = getchar();
  }
  while (t >= 48 && t <= 57) {
    x = (x << 3) + (x << 1) + t - 48;
    t = getchar();
  }
  if (neg) x = -x;
  return x;
}
inline void output(long long x) {
  char a[20];
  int i = 0, j;
  a[0] = '0';
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x == 0) putchar('0');
  while (x) {
    a[i++] = x % 10 + 48;
    x /= 10;
  }
  for (j = i - 1; j >= 0; j--) {
    putchar(a[j]);
  }
  putchar('\n');
}
long long dp[100010][4];
char s[100010], t[100010];
int main() {
  long long n, lent;
  n = input();
  scanf("%s%s", s, t);
  n = strlen(s);
  lent = strlen(t);
  dp[0][0] = 0;
  dp[0][1] = 0;
  dp[0][2] = 0;
  dp[0][3] = 1;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '?' && t[i] == '?') {
      dp[i + 1][0] =
          (dp[i][0] * 100 + dp[i][1] * 45 + dp[i][2] * 45) % 1000000007;
      dp[i + 1][1] = (45 * dp[i][3] + 55 * dp[i][1]) % 1000000007;
      dp[i + 1][2] = (45 * dp[i][3] + 55 * dp[i][2]) % 1000000007;
      dp[i + 1][3] = (dp[i][3] * 10) % 1000000007;
    } else if (s[i] == '?') {
      dp[i + 1][0] =
          (dp[i][0] * 10 + dp[i][1] * (t[i] - '0') + dp[i][2] * ('9' - t[i])) %
          1000000007;
      dp[i + 1][1] =
          (dp[i][3] * ('9' - t[i]) + dp[i][1] * ('9' - t[i] + 1)) % 1000000007;
      dp[i + 1][2] =
          (dp[i][3] * (t[i] - '0') + (t[i] - '0' + 1) * dp[i][2]) % 1000000007;
      dp[i + 1][3] = dp[i][3];
    } else if (t[i] == '?') {
      dp[i + 1][0] =
          (dp[i][0] * 10 + dp[i][1] * ('9' - s[i]) + dp[i][2] * (s[i] - '0')) %
          1000000007;
      dp[i + 1][1] =
          (dp[i][3] * (s[i] - '0') + dp[i][1] * (s[i] - '0' + 1)) % 1000000007;
      dp[i + 1][2] =
          (dp[i][3] * ('9' - s[i]) + ('9' - s[i] + 1) * dp[i][2]) % 1000000007;
      dp[i + 1][3] = dp[i][3];
    } else {
      if (s[i] == t[i]) {
        dp[i + 1][0] = dp[i][0];
        dp[i + 1][1] = dp[i][1];
        dp[i + 1][2] = dp[i][2];
        dp[i + 1][3] = dp[i][3];
      } else if (s[i] > t[i]) {
        dp[i + 1][0] = dp[i][0] + dp[i][2];
        dp[i + 1][1] = dp[i][1] + dp[i][3];
        dp[i + 1][2] = 0;
        dp[i + 1][3] = 0;
      } else {
        dp[i + 1][0] = dp[i][0] + dp[i][1];
        dp[i + 1][1] = 0;
        dp[i + 1][2] = dp[i][2] + dp[i][3];
        dp[i + 1][3] = 0;
      }
    }
  }
  output(dp[n][0]);
  return 0;
}
