#include <iostream>
using namespace std;

int main () {
int top,ofic,kon,tsar,dama,peshi,startop,starofic,starkon,startsar,stardama,starpeshi;
cin>>top>>ofic>>kon>>tsar>>dama>>peshi;
startop=2;
starofic=2;
starkon=2;
startsar=1;
stardama=1;
starpeshi=8;
cout<<starpeshi-peshi<<endl;
cout<<starofic-ofic<<endl;
cout<<starkon-kon<<endl;
cout<<startsar-tsar<<endl;
cout<<stardama-dama<<endl;
cout<<starpeshi-peshi<<endl;
}
