#include <bits/stdc++.h>
using namespace std;
int read() {
  char ch = getchar();
  int x = 0, pd = 0;
  while (ch < '0' || ch > '9') pd ^= ch == '-', ch = getchar();
  while ('0' <= ch && ch <= '9') x = x * 10 + (ch ^ 48), ch = getchar();
  return pd ? -x : x;
}
const int mod = 1000000007;
int add(int x, int y) { return x + y < mod ? x + y : x + y - mod; }
int mul(int x, int y) { return 1ll * x * y % mod; }
const int maxn = 100005;
int n;
char s[maxn], t[maxn];
int f[maxn][5];
int main() {
  n = read();
  scanf("%s%s", s + 1, t + 1);
  f[0][0] = f[0][1] = f[0][2] = f[0][3] = f[0][4] = 1;
  for (int i = 1; i <= n; i++) {
    if (s[i] == '?' && t[i] == '?') {
      f[i][0] = mul(f[i - 1][0], 10);
      f[i][2] = mul(f[i - 1][2], 55);
      f[i][4] = mul(f[i - 1][4], 55);
    } else if (s[i] == '?') {
      f[i][0] = f[i - 1][0];
      f[i][2] = mul(f[i - 1][2], t[i] - '0' + 1);
      f[i][4] = mul(f[i - 1][4], 10 - t[i] + '0');
    } else if (t[i] == '?') {
      f[i][0] = f[i - 1][0];
      f[i][2] = mul(f[i - 1][2], 10 - s[i] + '0');
      f[i][4] = mul(f[i - 1][4], s[i] - '0' + 1);
    } else {
      if (s[i] < t[i])
        f[i][2] = f[i - 1][2];
      else if (s[i] == t[i])
        f[i][0] = f[i - 1][0], f[i][2] = f[i - 1][2], f[i][4] = f[i - 1][4];
      else
        f[i][4] = f[i - 1][4];
    }
  }
  int All = 1;
  for (int i = 1; i <= n; i++) {
    int v1 = s[i] == '?' ? 10 : 1, v2 = t[i] == '?' ? 10 : 1;
    All = mul(All, mul(v1, v2));
  }
  printf("%d\n", add(All, mod - (add(add(f[n][2], f[n][4]), mod - f[n][0]))));
  return 0;
}
