#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


#define NUM 3005


enum Type{
	UNDEFINED,
	MUST_MEDICAL,
};

struct Info{
	Info(){
		node_index = 0;
		edge_num = 0;
	}
	Info(int arg_node_index,int arg_edge_num){
		node_index = arg_node_index;
		edge_num = arg_edge_num;
	}
	bool operator<(const struct Info &arg) const{
		return edge_num > arg.edge_num;
	}
	int node_index,edge_num;
};

int V,E,K,num_nodes;
int edge_num[NUM];
bool edge[NUM][NUM];
int ans,minimum;
Info first_info[NUM],info[NUM];
vector<int> first_G[NUM],G[NUM];
Type type[NUM];
map<int,int> MAP;

int total_index;


void recursive(int index){

	if(ans >= minimum || ans > K){
		return;
	}

	if(index == num_nodes){
		if(E == 0){
			minimum = ans;
		}else{
			printf("BUGG!!\n");
		}
		return;
	}

	int node_id = info[index].node_index;

	if(ans+(min(K-ans,num_nodes-index)*info[index].edge_num) < E){
		return;
	}

	if(edge_num[node_id] == 0){
		recursive(index+1);
		return;
	}

	if(type[node_id] == MUST_MEDICAL || edge_num[node_id] >= 2){

		if(type[node_id] == UNDEFINED){
			ans++;
		}
		E -= edge_num[node_id];
		for(int i = 0; i < G[node_id].size(); i++){
			if(!edge[node_id][G[node_id][i]])continue;
			edge_num[G[node_id][i]]--;
			edge[G[node_id][i]][node_id] = false;
		}

		recursive(index+1);

		if(type[node_id] == UNDEFINED){
			ans--;
		}
		E += edge_num[node_id];
		for(int i = 0; i < G[node_id].size(); i++){
			if(!edge[node_id][G[node_id][i]])continue;
			edge_num[G[node_id][i]]++;
			edge[G[node_id][i]][node_id] = true;
		}

		if(type[node_id] == MUST_MEDICAL)return;
	}

	if(ans+edge_num[node_id] >= min(minimum,K+1))return;

	ans += edge_num[node_id];
	E -= edge_num[node_id];

	for(int i = 0; i < G[node_id].size(); i++){
		if(!edge[node_id][G[node_id][i]])continue;
		edge_num[G[node_id][i]]--;
		type[G[node_id][i]] = MUST_MEDICAL;
		edge[G[node_id][i]][node_id] = false;
	}

	recursive(index+1);

	ans -= edge_num[node_id];
	E += edge_num[node_id];

	for(int i = 0; i < G[node_id].size(); i++){
		if(!edge[node_id][G[node_id][i]])continue;
		edge_num[G[node_id][i]]++;
		type[G[node_id][i]] = UNDEFINED;
		edge[G[node_id][i]][node_id] = true;
	}
}

int get_index(int node_id){

	auto at = MAP.find(node_id);
	if(at == MAP.end()){
		MAP[node_id] = total_index++;
	}
	return MAP[node_id];
}

int main(){

	scanf("%d %d %d",&V,&E,&K);

	for(int i = 0; i < V; i++){
		first_info[i].node_index = i;
		first_info[i].edge_num = 0;
		type[i] = UNDEFINED;
		edge_num[i] = 0;
	}

	for(int i = 0; i < V; i++){
		for(int k = 0; k < V; k++){
			edge[i][k] = false;
		}
	}

	int from,to;

	for(int loop = 0; loop < E; loop++){

		scanf("%d %d",&from,&to);
		from--;
		to--;

		from = get_index(from);
		to = get_index(to);

		first_info[from].edge_num++;
		first_info[to].edge_num++;

		first_G[from].push_back(to);
		first_G[to].push_back(from);

		edge[from][to] = true;
		edge[to][from] = true;
	}

	sort(first_info,first_info+V);

	ans = 0;

	for(int i = 0; i < V; i++){
		if(first_info[i].edge_num <= K)break;

		ans++;
		type[i] = MUST_MEDICAL;

		E -= first_G[first_info[i].node_index].size();

		for(int k = 0; k < first_G[first_info[i].node_index].size(); k++){

			edge[first_info[i].node_index][first_G[first_info[i].node_index][k]] = false;
			edge[first_G[first_info[i].node_index][k]][first_info[i].node_index] = false;
		}
	}

	if(ans > K){
		printf("Impossible\n");
		return 0;
	}

	int index = 0,node_id;

	for(int i = 0; i < V; i++){
		if(type[i] == MUST_MEDICAL)continue;

		info[index].node_index = first_info[i].node_index;
		node_id = info[index].node_index;

		for(int k = 0; k < first_G[node_id].size(); k++){
			if(edge[node_id][first_G[node_id][k]] == false)continue;

			edge_num[node_id]++;

			G[node_id].push_back(first_G[node_id][k]);
		}
		info[index].edge_num = edge_num[node_id];
		index++;
	}

	sort(info,info+index);

	minimum = BIG_NUM;

	for(int i = 0; i < V; i++){
		type[i] = UNDEFINED;
	}

	num_nodes = index;

	recursive(0);

	if(minimum > K){

		printf("Impossible\n");

	}else{

		printf("%d\n",minimum);
	}

	return 0;
}



Measured memory_bytes: 12568