#include "bits/stdc++.h" using namespace std; long x,y,z,o,k; int main(){ cin >> x; int i = 3; while (i --){ y=x; z -= z; while (y --){ cin >> o; z += o; } cout << z << " "; k += z; } cout << k; return 0; }