public String getTask(String[] list, int n) {
		ArrayList<String> strings = new ArrayList<String>();
		for (String s : list) {
			strings.add(s);
		}
		int current = 0;
		while (strings.size() > 1) {
			current += n - 1;
			current %= strings.size();
			strings.remove(current);
		}
		return strings.get(0);
	}