#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
template <class T>
T Abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
long long Pow(long long B, long long P) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) R = (R * B);
    P /= 2;
    B = (B * B);
  }
  return R;
}
long long BigMod(long long B, long long P, long long M) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) {
      R = (R * B) % M;
    }
    P /= 2;
    B = (B * B) % M;
  }
  return R;
}
string S, G;
long long mod = 1000000007LL;
struct data {
  long long sm, gr, neu;
  data(long long a, long long b, long long c) {
    sm = a;
    gr = b;
    neu = c;
  }
};
vector<data> v;
long long dp[100050][2][2];
long long rec(int pos, int greater, int smaller) {
  if (pos >= (int)S.size()) {
    if (greater && smaller)
      return 1LL;
    else
      return 0LL;
  }
  long long &ret = dp[pos][greater][smaller];
  if (ret != -1) return ret;
  ret = 0;
  ret = (ret + v[pos].gr * rec(pos + 1, 1, smaller)) % mod;
  ret = (ret + v[pos].sm * rec(pos + 1, greater, 1)) % mod;
  ret = (ret + v[pos].neu * rec(pos + 1, greater, smaller)) % mod;
  return ret;
}
int main() {
  int len;
  cin >> len;
  cin >> S >> G;
  for (int i = 0; i < (int)S.size(); i++) {
    if (S[i] == '?' && G[i] == '?')
      v.push_back(data(45, 45, 10));
    else if (S[i] == '?') {
      v.push_back(data(9 - G[i] + '0', G[i] - '0', 1));
    } else if (G[i] == '?') {
      v.push_back(data(S[i] - '0', 9 - S[i] + '0', 1));
    } else if (S[i] > G[i])
      v.push_back(data(1, 0, 0));
    else if (S[i] < G[i])
      v.push_back(data(0, 1, 0));
    else
      v.push_back(data(0, 0, 1));
  }
  memset(dp, -1, sizeof dp);
  long long ans = rec(0, 0, 0);
  cout << ans << endl;
  return 0;
}
