#include #include #include #include using namespace std; int main(){ int x,i; for(i=1;i<=9;i++){ cin >> x; if(x!=i) cout << i; } return 0; }