#include using namespace std; int main() { std::ios::sync_with_stdio(false); int a[32] = { 0 }; unsigned int n, num, pos, ansnum = 0; int ans[32] = { 0 }; cin >> n; //file >> n; for (int i = 0; i < 3 * n - 1; i++) { cin >> num; //file >> num; for (pos = 0; pos < 32; pos++) { if((num>>pos)&1) a[pos] += 1; } } for (int i = 0; i < 32; i++) { if (a[i] % 3) { ans[i] = 1; } } for (int i = 0; i < 32; i++) { ansnum *= 2; ansnum += ans[31-i]; } cout << ansnum; }