#include <iostream>
using namespace std;

int main(){
    string A,B,C;
    while(cin>>A,A[0]!='0'){
        cin>>B>>C;
        int len=A.size();
        int dp[len+1][2];
        fill(dp[0],dp[len+1],0);
        dp[0][0]=1;
        for(int i=1;i<=len;i++){
            int a,b,c;
            a=(A[len-i]=='?'?-1:A[len-i]-'0');
            b=(B[len-i]=='?'?-1:B[len-i]-'0');
            c=(C[len-i]=='?'?-1:C[len-i]-'0');
            for(int ai=0;ai<10;ai++){
                if(a!=-1&&ai!=a) continue;
                if(i==len&&ai==0) continue;
                for(int bi=0;bi<10;bi++){
                    if(b!=-1&&bi!=b) continue;
                    if(i==len&&bi==0) continue;
                    int ci=ai+bi;
                    if(c==-1){
                        if(ci<10){
                            dp[i][0]+=dp[i-1][0];
                            dp[i][0]%=1000000007;
                        }else{
                            dp[i][1]+=dp[i-1][0];
                            dp[i][1]%=1000000007;
                        }
                    }else{
                        if(ci<10&&c==ci){
                            dp[i][0]+=dp[i-1][0];
                            dp[i][0]%=1000000007;
                        }else if(ci>=10&&c==ci-10){
                            dp[i][1]+=dp[i-1][0];
                            dp[i][1]%=1000000007;
                        }
                    }
                    ci++;
                    if(c==-1){
                        if(ci<10){
                            dp[i][0]+=dp[i-1][1];
                            dp[i][0]%=1000000007;
                        }else{
                            dp[i][1]+=dp[i-1][1];
                            dp[i][1]%=1000000007;
                        }
                    }else{
                        if(ci<10&&c==ci){
                            dp[i][0]+=dp[i-1][1];
                            dp[i][0]%=1000000007;
                        }else if(ci>=10&&c==ci-10){
                            dp[i][1]+=dp[i-1][1];
                            dp[i][1]%=1000000007;
                        }
                    }
                }
            }
            // cout<<dp[i][0]<<' '<<dp[i][1]<<endl;
        }
        cout<<dp[len][0]<<endl;
    }
    return 0;
}
