#pragma warning(disable: 4996)
#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <random>
#include <unordered_map>
#include <functional>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <vector>
#include <bitset>
#include <numeric>
#include <string>
#include <set>
#include <tuple>
#include <utility>
#include <regex>
using namespace std;

int main(void) {
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int N;
	cin >> N;
	string A;
	vector<long long> num(N);
	for (int i = 0; i < N; ++i) {
		cin >> A;
		if (A.size() > 11) {
			A = A.substr(A.size() - 11, A.size());
		}
		long long a = stoll(A);
		num[i] = a;
	}

	long long c = num[0];
	for (int i = 1; i < N; ++i) {
		c = c xor num[i];
	}
	cout << c%(1e9+7);
	return 0;
}