#include <bits/stdc++.h>
using namespace std;

#define dump(n) cout<<"# "<<#n<<'='<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define peri(i,a,b) for(int i=int(b);i-->int(a);)
#define rep(i,n) repi(i,0,n)
#define per(i,n) peri(i,0,n)
#define all(c) begin(c),end(c)
#define mp make_pair
#define mt make_tuple

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<string> vs;

constexpr int INF=1e9;
constexpr int MOD=1e9+7;
constexpr double EPS=1e-9;

template<typename T1,typename T2>
ostream& operator<<(ostream& os,const pair<T1,T2>& p){
	return os<<'('<<p.first<<','<<p.second<<')';
}
template<typename Ostream,typename Container>
Ostream& operator<<(Ostream& os,const Container& c){
	os<<'[';
	for(auto i=begin(c);i!=end(c);++i)
		os<<(i==begin(c)?"":" ")<<*i;
	return os<<']';
}

int main()
{
	for(array<string,3> ss;cin>>ss[0]>>ss[1]>>ss[2];){
		int n=ss[0].size();
		rep(i,3) reverse(all(ss[i]));
		
		vvi dp(2,vi(n+1)); dp[0][0]=1;
		rep(i,n){
			vvi cs(3);
			rep(j,3){
				if(ss[j][i]=='?')
					cs[j]=i==n-1?vi{1,2,3,4,5,6,7,8,9}:vi{0,1,2,3,4,5,6,7,8,9};
				else
					cs[j].push_back(ss[j][i]-'0');
			}
			rep(carry,2){
				for(int c0:cs[0]) for(int c1:cs[1]) for(int c2:cs[2]){
					if(carry+c0+c1==c2)
						(dp[0][i+1]+=dp[carry][i])%=MOD;
					if(carry+c0+c1==10+c2)
						(dp[1][i+1]+=dp[carry][i])%=MOD;
				}
			}
		}
		cout<<dp[0][n]<<endl;
	}
}