#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define INF 100000000
#define EPS 1e-10
#define MOD 1000000007
using namespace std;
typedef pair<int,int> P;
typedef long long ll;

string a, b, c;
ll dp[2][100];

ll calc(int dif, int rank){
	ll ret = 0;
	if(rank == -1){
		if(dif == 0) return 1;
		else return 0;
	}
	if(dp[dif][rank] != -1) return dp[dif][rank];
	if(a[rank] != '?' && b[rank] != '?'){
		int A = a[rank]-'0', B = b[rank]-'0';
		if(c[rank] == '?' || (A+B+dif)%10 == c[rank]-'0'){
			if(A+B+dif >= 10) ret = calc(1,rank-1);
			else ret = calc(0,rank-1);
		}
		dp[dif][rank] = ret;
		return ret;
	}
	if(a[rank] == '?' && b[rank] != '?') swap(a[rank],b[rank]);
	if(a[rank] != '?' && b[rank] == '?'){
		int A = a[rank]-'0';
		for(int B = 0; B <= 9; B++){
			if(rank == 0 && B == 0) continue;
			if(c[rank] == '?' || (A+B+dif)%10 == c[rank]-'0'){
				if(A+B+dif >= 10) ret += calc(1,rank-1);
				else ret += calc(0,rank-1);
			}
		}
		dp[dif][rank] = ret%MOD;
		return ret%MOD;
	}
	for(int A = 0; A <= 9; A++){
		if(rank == 0 && A == 0) continue;
		for(int B = 0; B <= 9; B++){
			if(rank == 0 && B == 0) continue;
			if(c[rank] == '?' || (A+B+dif)%10 == c[rank]-'0'){
				if(A+B+dif >= 10) ret += calc(1,rank-1);
				else ret += calc(0,rank-1);
			}
		}
	}
	dp[dif][rank] = ret%MOD;
	return ret%MOD;
}

void solve(){
	rep(i,2) rep(j,100) dp[i][j] = -1;
	cout << calc(0,a.size()-1) << endl;
}

int main(){
	while(cin >> a >> b >> c){
		solve();
	}
}