#include <bits/stdc++.h>
using namespace std;
const long long Mod = 1000000007;
char S[100005], W[100005];
long long dp1[4], dp2[4], *p1 = dp1, *p2 = dp2;
int main() {
  int N, st = 0, n[3];
  ios::sync_with_stdio(false);
  cin >> N >> S + 1 >> W + 1;
  p1[0] = 1;
  for (int i = 1; i <= N; ++i) {
    fill_n(p2, 4, 0ll);
    n[0] = n[1] = n[2] = 0;
    if (S[i] != '?' && W[i] != '?') {
      if (S[i] < W[i]) {
        st |= 1;
        n[1] = 1;
      } else if (S[i] > W[i]) {
        st |= 2;
        n[2] = 1;
      } else
        n[0] = 1;
    } else if (S[i] == '?' && W[i] != '?') {
      n[0] = 1;
      n[1] = W[i] - '0';
      n[2] = '9' - W[i];
    } else if (S[i] != '?' && W[i] == '?') {
      n[1] = '9' - S[i];
      n[2] = S[i] - '0';
      n[0] = 1;
    } else {
      n[1] = n[2] = 45;
      n[0] = 10;
    }
    for (int j = 0; j < 4; ++j)
      if (p1[j]) {
        for (int k = 0; k < 3; ++k)
          if (n[k]) {
            int s = j | st | k;
            p2[s] = (p2[s] + p1[j] * n[k]) % Mod;
          }
      }
    swap(p1, p2);
  }
  cout << p1[3] << endl;
  return 0;
}
