#include #include using namespace std;int main(){int b[10]={20104,20063,19892,20011,19874,20199,19898,20163,19956,19841};string s;cin >> s;int n[10] = {0};for(char c:s){if(c!='.')n[c-'0']++;}int t,f;for(int i=0;i<10;i++){if(n[i]==b[i]+1){f=i;}if(n[i]==b[i]-1){t=i;}}cout<