#include <bits/stdc++.h>
using namespace std;
char a[100005], b[100005];
long long dp[100005][5];
int main() {
  long long i, j, k;
  long long n;
  while (cin >> n) {
    scanf("%s%s", &a[1], &b[1]);
    memset(dp, 0, sizeof(dp));
    for (i = 1; i <= n; i++) {
      if (a[i] == '?') {
        if (b[i] == '?') {
          dp[i][1] = (55 * (dp[i - 1][1]) + 45 * (dp[i - 1][2])) % 1000000007;
          dp[i][2] = (10 * dp[i - 1][2]) % 1000000007;
          dp[i][3] = (55 * (dp[i - 1][3]) + 45 * (dp[i - 1][2])) % 1000000007;
          dp[i][4] =
              (45 * dp[i - 1][3] + 45 * dp[i - 1][1] + 100 * dp[i - 1][4]) %
              1000000007;
          if (dp[i][1] + 0 + dp[i][3] + dp[i][2] + dp[i][4] == 0) {
            dp[i][1] = 45;
            dp[i][3] = 45;
            dp[i][2] = 10;
          }
        } else {
          long long up = '9' - b[i];
          long long dowm = b[i] - '0';
          dp[i][1] =
              (up * (dp[i - 1][1] + dp[i - 1][2]) + dp[i - 1][1]) % 1000000007;
          dp[i][2] = dp[i - 1][2];
          dp[i][3] = (dowm * (dp[i - 1][3] + dp[i - 1][2]) + dp[i - 1][3]) %
                     1000000007;
          dp[i][4] =
              (up * dp[i - 1][3] + dowm * dp[i - 1][1] + 10 * dp[i - 1][4]) %
              1000000007;
          if (dp[i][1] + 0 + dp[i][3] + dp[i][2] + dp[i][4] == 0) {
            dp[i][1] = up;
            dp[i][3] = dowm;
            dp[i][2] = 1;
          }
        }
      } else {
        if (b[i] == '?') {
          long long up = a[i] - '0';
          long long dowm = '9' - a[i];
          dp[i][1] =
              (up * (dp[i - 1][1] + dp[i - 1][2]) + dp[i - 1][1]) % 1000000007;
          dp[i][2] = dp[i - 1][2];
          dp[i][3] = (dowm * (dp[i - 1][3] + dp[i - 1][2]) + dp[i - 1][3]) %
                     1000000007;
          dp[i][4] =
              (up * dp[i - 1][3] + dowm * dp[i - 1][1] + 10 * dp[i - 1][4]) %
              1000000007;
          if (dp[i][1] + 0 + dp[i][3] + dp[i][2] + dp[i][4] == 0) {
            dp[i][1] = up;
            dp[i][3] = dowm;
            dp[i][2] = 1;
          }
        } else {
          if (a[i] > b[i]) {
            dp[i][1] = (dp[i - 1][1] + dp[i - 1][2]) % 1000000007;
            dp[i][4] = (dp[i - 1][3] + dp[i - 1][4]) % 1000000007;
            if (dp[i][1] + 0 + dp[i][3] + dp[i][2] + dp[i][4] == 0)
              dp[i][1] = 1;
          } else if (a[i] == b[i]) {
            dp[i][1] = dp[i - 1][1];
            dp[i][2] = dp[i - 1][2];
            dp[i][3] = dp[i - 1][3];
            dp[i][4] = dp[i - 1][4];
            if (dp[i][1] + 0 + dp[i][3] + dp[i][2] + dp[i][4] == 0)
              dp[i][2] = 1;
          } else {
            dp[i][3] = (dp[i - 1][3] + dp[i - 1][2]) % 1000000007;
            dp[i][4] = (dp[i - 1][1] + dp[i - 1][4]) % 1000000007;
            if (dp[i][1] + 0 + dp[i][3] + dp[i][2] + dp[i][4] == 0)
              dp[i][3] = 1;
          }
        }
      }
    }
    cout << dp[n][4] << endl;
  }
  return 0;
}
