public static YearsStatisticsByCities convert(
			CitiesStatisticsByYears statisticsByYears) {

		YearsStatisticsByCities yearsStatisticsByCities = new YearsStatisticsByCities();
		Map<City, EmployeesStatisticsByYears> emplByCities = new TreeMap<City, EmployeesStatisticsByYears>();

		EmployeesStatisticsByYears employeesStatisticsByYears;
		Map<Integer, EmployeesOnQuarters> emplByYear;

		for (Entry<Integer, EmployeesStatisticsByCities> yearEntry : statisticsByYears
				.getCitiesStatistics().entrySet()) {
			for (Entry<City, EmployeesOnQuarters> cityEntry : yearEntry
					.getValue().getStatisticsByCities().entrySet()) {
				City city = cityEntry.getKey();
				if (!emplByCities.containsKey(city)) {
					employeesStatisticsByYears = new EmployeesStatisticsByYears();
					emplByYear = new TreeMap<Integer, EmployeesOnQuarters>();
					emplByYear.put(yearEntry.getKey(), cityEntry.getValue());
					employeesStatisticsByYears.setEmplStat(emplByYear);
					emplByCities.put(city, employeesStatisticsByYears);
				} else {
					employeesStatisticsByYears = emplByCities.get(city);
					emplByYear = employeesStatisticsByYears.getEmplStat();
					emplByYear.put(yearEntry.getKey(), cityEntry.getValue());
				}

			}

		}
		yearsStatisticsByCities.setEmpl(emplByCities);
		return yearsStatisticsByCities;
	}