#include<stdio.h>
#include<stdlib.h>
int main()
{
char s[7],i;
while(scanf("%s",s)!=EOF)
for(i=0;i<6;i++)
printf("%d",abs((int)s[i]-(int)s[i+1]));
}
printf("\n");
return 0;