#include <bits/stdc++.h>
const long long MODULUS = 1000000007LL;
void run_case(int n, char* a, char* b) {
  long long t = 1, c1 = 1, c2 = 1, c3 = 1;
  for (int i = 0; i < n; ++i) {
    if (a[i] == '?' && b[i] == '?') {
      t *= 100;
      c1 *= 55;
      c2 *= 55;
      c3 *= 10;
    } else if (a[i] != '?' && b[i] == '?') {
      t *= 10;
      c1 *= 10 - (a[i] - '0');
      c2 *= (a[i] - '0') + 1;
    } else if (a[i] == '?' && b[i] != '?') {
      t *= 10;
      c1 *= (b[i] - '0') + 1;
      c2 *= 10 - (b[i] - '0');
    } else {
      c1 *= (a[i] <= b[i]) ? 1 : 0;
      c2 *= (a[i] >= b[i]) ? 1 : 0;
      c3 *= (a[i] == b[i]) ? 1 : 0;
    }
    t %= MODULUS;
    c1 %= MODULUS;
    c2 %= MODULUS;
    c3 %= MODULUS;
  }
  long long result = (t + MODULUS - (c1 + c2 - c3) % MODULUS) % MODULUS;
  printf("%lld\n", result);
}
int main(void) {
  int n, i;
  if (scanf("%d", &n) != 1) return 1;
  char *a = new char[n], *b = new char[n];
  i = 0;
  while (i < n) {
    char c = getc(stdin);
    if (c == '\n') continue;
    a[i++] = c;
  }
  i = 0;
  while (i < n) {
    char c = getc(stdin);
    if (c == '\n') continue;
    b[i++] = c;
  }
  run_case(n, a, b);
  delete[] a;
  delete[] b;
  return 0;
}
