#include <bits/stdc++.h>
int solve(int a, int b);
int main() {
  const int up = 58;
  const int down = 47;
  char a[100001], b;
  int n, i;
  int ans = 1, x = 1, y = 1, z = 1;
  scanf("%i\n", &n);
  gets(a);
  for (i = 0; i < n; i++) {
    b = getchar();
    if (a[i] == '?' && b == '?') {
      ans = solve(ans, 100);
      x = solve(x, 55);
      y = solve(y, 55);
      z = solve(z, 10);
      continue;
    }
    if (a[i] == '?') {
      ans = solve(ans, 10);
      x = solve(x, up - b);
      y = solve(y, b - down);
      continue;
    }
    if (b == '?') {
      ans = solve(ans, 10);
      x = solve(x, a[i] - down);
      y = solve(y, up - a[i]);
      continue;
    }
    if (a[i] == b) continue;
    if (a[i] > b)
      y = 0;
    else
      x = 0;
    z = 0;
  }
  ans = ans - x - y + z;
  if (ans < 0) ans += 1000000007;
  printf("%i", ans);
  return 0;
}
int solve(int a, int b) { return (int)((1ll * a * b) % 1000000007); }
