#include <bits/stdc++.h>
const int MOD = 1000000007;
int n;
char sa[100010];
char sb[100010];
char temp[100010];
int rcd[100000][4];
long long dp(int t, int st) {
  if (t == n) {
    if (st == 3)
      return 1;
    else
      return 0;
  }
  if (rcd[t][st] != -1) return rcd[t][st];
  long long ret = 0;
  if (sa[t] == '?' && sb[t] == '?') {
    ret += dp(t + 1, st | 1) * 45;
    ret += dp(t + 1, st | 2) * 45;
    ret += dp(t + 1, st) * 10;
  } else if (sa[t] == '?') {
    int d = sb[t] - '0';
    ret += dp(t + 1, st | 1) * (9 - d);
    ret += dp(t + 1, st | 2) * d;
    ret += dp(t + 1, st) * 1;
  } else if (sb[t] == '?') {
    int d = sa[t] - '0';
    ret += dp(t + 1, st | 1) * d;
    ret += dp(t + 1, st | 2) * (9 - d);
    ret += dp(t + 1, st) * 1;
  } else {
    if (sa[t] > sb[t])
      ret += dp(t + 1, st | 1) * 1;
    else if (sa[t] < sb[t])
      ret += dp(t + 1, st | 2) * 1;
    else
      ret += dp(t + 1, st) * 1;
  }
  return rcd[t][st] = ret % MOD;
}
int main() {
  scanf("%d%s%s", &n, sa, sb);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= 3; j++) {
      rcd[i][j] = -1;
    }
  }
  int ret = dp(0, 0);
  printf("%d\n", ret);
}
