#include<iostream>#include<cmath>using namespace std;char in[7];int main(){while(cin>>in){ for(unsigned short lcv = 0;lcv<6;lcv++) cout<<abs(in[lcv+1]-in[lcv]); cout<<endl;}return 0;}