#include <bits/stdc++.h>
int big[100005], sml[100005], eql[100005], n, l;
char a[100005], b[100005];
int main() {
  while (scanf("%d", &n) != EOF) {
    scanf("%s%s", a, b);
    l = strlen(a);
    for (int i = 0; i < l; ++i) {
      big[i] = sml[i] = eql[i] = 0;
      if (a[i] == '?' && b[i] == '?') {
        big[i] = sml[i] = 45;
        eql[i] = 10;
      } else if (a[i] == '?') {
        big[i] = 9 - (b[i] - '0');
        sml[i] = (b[i] - '0');
        eql[i] = 1;
      } else if (b[i] == '?') {
        big[i] = (a[i] - '0');
        sml[i] = 9 - (a[i] - '0');
        eql[i] = 1;
      } else {
        if (a[i] > b[i])
          big[i] = 1;
        else if (a[i] < b[i])
          sml[i] = 1;
        else
          eql[i] = 1;
      }
    }
    long long ans = big[0] + eql[0] + sml[0];
    for (int i = 1; i < l; ++i) {
      ans *= big[i] + eql[i] + sml[i];
      if (ans >= 1000000007) {
        ans %= 1000000007;
      }
    }
    long long allnosml = big[0] + eql[0];
    for (int i = 1; i < l; ++i) {
      allnosml *= (big[i] + eql[i]);
      if (allnosml >= 1000000007) {
        allnosml %= 1000000007;
      }
    }
    long long allnobig = sml[0] + eql[0];
    for (int i = 1; i < l; ++i) {
      allnobig *= (sml[i] + eql[i]);
      if (allnobig >= 1000000007) {
        allnobig %= 1000000007;
      }
    }
    long long alleql = eql[0];
    for (int i = 1; i < l; ++i) {
      alleql *= eql[i];
      if (alleql >= 1000000007) {
        alleql %= 1000000007;
      }
    }
    ans += alleql - allnobig - allnosml;
    ans = (ans + 1000000007) % 1000000007;
    printf("%I64d\n", ans);
  }
}
