#include <bits/stdc++.h>

using namespace std;

typedef long long llint;
const llint MOD = 1e9 + 7;
llint dp[110][2];

int main() {
  string a, b, c;
  while (true) {
    cin >> a;
    if (a == "0") break;
    cin >> b >> c;
    reverse(a.begin(), a.end());
    reverse(b.begin(), b.end());
    reverse(c.begin(), c.end());
    for (int i = 0; i < 110; i++) {
      for (int j = 0; j < 2; j++) {
        dp[i][j] = 0;
      }
    }

    dp[0][0] = 1;
    for (int i = 0; i < c.size(); i++) {
      if (c[i] == '?') {
        if (a[i] == '?') {
          if (b[i] == '?') {                  // a=?, b=?, c=?
            for (int p = 0; p <= 9; p++) {    // a
              for (int q = 0; q <= 9; q++) {  // b
                if (i + 1 == c.size() && p == 0) continue;
                if (i + 1 == c.size() && q == 0) continue;

                dp[i + 1][(p + q > 9)] += dp[i][0];
                dp[i + 1][(p + q + 1 > 9)] += dp[i][1];
                dp[i + 1][0] %= MOD, dp[i + 1][1] %= MOD;
              }
            }
          } else {
            int q = b[i] - '0';
            for (int p = 0; p <= 9; p++) {  // a
              if (i + 1 == c.size() && p == 0) continue;
              dp[i + 1][(p + q > 9)] += dp[i][0];
              dp[i + 1][(p + q + 1 > 9)] += dp[i][1];
              dp[i + 1][0] %= MOD, dp[i + 1][1] %= MOD;
            }
          }
        } else {
          int p = a[i] - '0';
          if (b[i] == '?') {                // b=?, c=?
            for (int q = 0; q <= 9; q++) {  // b
              if (i + 1 == c.size() && q == 0) continue;
              dp[i + 1][(p + q > 9)] += dp[i][0];
              dp[i + 1][(p + q + 1 > 9)] += dp[i][1];
              dp[i + 1][0] %= MOD, dp[i + 1][1] %= MOD;
            }
          } else {
            int p = a[i] - '0';
            int q = b[i] - '0';
            dp[i + 1][(p + q > 9)] += dp[i][0];
            dp[i + 1][(p + q + 1 > 9)] += dp[i][1];
            dp[i + 1][0] %= MOD, dp[i + 1][1] %= MOD;
          }
        }
      } else {
        int num = c[i] - '0';
        if (a[i] == '?') {
          if (b[i] == '?') {                  // a=?, b=?
            for (int p = 0; p <= 9; p++) {    // a
              for (int q = 0; q <= 9; q++) {  // b
                if (i + 1 == c.size() && p == 0) continue;
                if (i + 1 == c.size() && q == 0) continue;
                if (p + q <= 9) {
                  if (p + q == num) dp[i + 1][0] += dp[i][0];
                  if ((p + q + 1) <= 9) {
                    if (p + q + 1 == num) dp[i + 1][0] += dp[i][1];
                  } else {
                    if ((p + q + 1) % 10 == num) dp[i + 1][1] += dp[i][1];
                  }
                } else {
                  if ((p + q) % 10 == num) dp[i + 1][1] += dp[i][0];
                  if ((p + q + 1) % 10 == num) dp[i + 1][1] += dp[i][1];
                }
                dp[i + 1][0] %= MOD, dp[i + 1][1] %= MOD;
              }
            }
          } else {
            int q = b[i] - '0';
            for (int p = 0; p <= 9; p++) {  // a
              if (i + 1 == c.size() && p == 0) continue;
              if (p + q <= 9) {
                if (p + q == num) dp[i + 1][0] += dp[i][0];
                if ((p + q + 1) <= 9) {
                  if (p + q + 1 == num) dp[i + 1][0] += dp[i][1];
                } else {
                  if ((p + q + 1) % 10 == num) dp[i + 1][1] += dp[i][1];
                }
              } else {
                if ((p + q) % 10 == num) dp[i + 1][1] += dp[i][0];
                if ((p + q + 1) % 10 == num) dp[i + 1][1] += dp[i][1];
              }
              dp[i + 1][0] %= MOD, dp[i + 1][1] %= MOD;
            }
          }
        } else {
          if (b[i] == '?') {
            int p = a[i] - '0';
            for (int q = 0; q <= 9; q++) {
              if (i + 1 == c.size() && q == 0) continue;
              if (p + q <= 9) {
                if (p + q == num) dp[i + 1][0] += dp[i][0];
                if ((p + q + 1) <= 9) {
                  if (p + q + 1 == num) dp[i + 1][0] += dp[i][1];
                } else {
                  if ((p + q + 1) % 10 == num) dp[i + 1][1] += dp[i][1];
                }
              } else {
                if ((p + q) % 10 == num) dp[i + 1][1] += dp[i][0];
                if ((p + q + 1) % 10 == num) dp[i + 1][1] += dp[i][1];
              }

              dp[i + 1][0] %= MOD, dp[i + 1][1] %= MOD;
            }

          } else {
            int p, q;
            p = a[i] - '0';
            q = b[i] - '0';
            if (p + q <= 9) {
              if (p + q == num) dp[i + 1][0] += dp[i][0];

              if ((p + q + 1) <= 9) {
                if (p + q + 1 == num) dp[i + 1][0] += dp[i][1];
              } else {
                if ((p + q + 1) % 10 == num) dp[i + 1][1] += dp[i][1];
              }
            } else {
              if ((p + q) % 10 == num) dp[i + 1][1] += dp[i][0];
              if ((p + q + 1) % 10 == num) dp[i + 1][1] += dp[i][1];
            }
            dp[i + 1][0] %= MOD, dp[i + 1][1] %= MOD;
          }
        }
      }
    }

    cout << dp[c.size()][0] << endl;
  }

  return 0;
}
