# Name : Sachdev Hitesh
# College : GLSICA
user = int(input())
n = list(input().split(" "))
l = len(n)-1
#if int(n[0]) == 3 and int(n[l])!=3:
#	n.reverse()
r = 0
a = 0
c = 0
res = []
for i in n:
	if int(i) == 0:
		r = r + 1
		a = 0
		c = c + 1
	if int(i) == 1 :
		if a == 0 or a!=2:
			a = 2
			c = c + 1
		else:
			r = r + 1
			a = 0
			c = c + 1
	if int(i) == 2:
		if a == 0 or a!=1:
			a = 1
			c = c + 1
		else:
			r = r + 1
			a = 0
			c = c + 1
	if int(i) == 3:
		if a==0:
			while c < len(n) and n[c] == 3:
				c = c + 1
			if c < len(n):
				if n[c] == 1:
					a = 2
				elif n[c] == 2:
					a = 1
		elif a!=1:
			a = 1
		elif a!=2:
			a = 2
print(r)


from functools import lru_cache
n = int(input())
arr = list(map(int,input().split()))

@lru_cache(None)
def dfs(i, ch,days):

    if i >= len(arr):
        return days

    d1,d2,d3,d4 = 0, 0, 0, 0
    if arr[i] == 1 and ch != 1:
        d1 = dfs(i+1,1,days+1)

    elif arr[i] == 2 and ch!= 2:
        d2 = dfs(i+1, 2, days+1)

    elif arr[i] == 3:
        if ch == 1:
            d3 = dfs(i+1, 2, days+1)
        elif ch == 2:
            d3 = dfs(i+1, 1, days+1)
        else:
            d3 = max(dfs(i+1, 1, days+1), dfs(i+1, 2, days+1))
    else:
        d4 = dfs(i+1,0, days)

    return max(d1, d2, d3, d4)

print(len(arr) - dfs(0,0,0))


# from functools import lru_cache
# n = int(input())
# arr = list(map(int,input().split()))

# @lru_cache(None)
# def dfs(i, ch,days):

    # if i >= len(arr):
        # return days

    # d1,d2,d3,d4 = 0, 0, 0, 0
    # if arr[i] == 1 and ch != 1:
        # d1 = dfs(i+1,1,days+1)

    # elif arr[i] == 2 and ch!= 2:
        # d2 = dfs(i+1, 2, days+1)

    # elif arr[i] == 3:
        # if ch == 1:
            # d3 = dfs(i+1, 2, days+1)
        # elif ch == 2:
            # d3 = dfs(i+1, 1, days+1)
        # else:
            # d3 = max(dfs(i+1, 1, days+1), dfs(i+1, 2, days+1))
    # else:
        # d4 = dfs(i+1,0, days)

    # return max(d1, d2, d3, d4)

# print(len(arr) - dfs(0,0,0))

n = int(input())
arr = list(map(int, input().split()))

dp = [[0,0,0] for _ in range(len(arr)+1)]

for i, v in enumerate(arr):

    dp[i+1][0] = max(dp[i])

    if v == 1 or v == 3:
        dp[i+1][1] = max(dp[i][0]+1, dp[i][2]+1)
    else:
        dp[i+1][1] = dp[i][1]

    if v == 2 or v == 3:
        dp[i+1][2] = max(dp[i][0]+1, dp[i][1]+1)
    else:
        dp[i+1][2] = dp[i][2]

for d in dp:
    print(d)

print(n-max(dp[i+1]))


# from functools import lru_cache
# n = int(input())
# arr = list(map(int,input().split()))

# @lru_cache(None)
# def dfs(i, ch,days):

    # if i >= len(arr):
        # return days

    # d1,d2,d3,d4 = 0, 0, 0, 0
    # if arr[i] == 1 and ch != 1:
        # d1 = dfs(i+1,1,days+1)

    # elif arr[i] == 2 and ch!= 2:
        # d2 = dfs(i+1, 2, days+1)

    # elif arr[i] == 3:
        # if ch == 1:
            # d3 = dfs(i+1, 2, days+1)
        # elif ch == 2:
            # d3 = dfs(i+1, 1, days+1)
        # else:
            # d3 = max(dfs(i+1, 1, days+1), dfs(i+1, 2, days+1))
    # else:
        # d4 = dfs(i+1,0, days)

    # return max(d1, d2, d3, d4)

# print(len(arr) - dfs(0,0,0))

n = int(input())
arr = list(map(int, input().split()))

dp = [[0,0,0] for _ in range(len(arr)+1)]

for i, v in enumerate(arr):

    dp[i+1][0] = max(dp[i])

    if v == 1 or v == 3:
        dp[i+1][1] = max(dp[i][0]+1, dp[i][2]+1)
    else:
        dp[i+1][1] = dp[i][1]

    if v == 2 or v == 3:
        dp[i+1][2] = max(dp[i][0]+1, dp[i][1]+1)
    else:
        dp[i+1][2] = dp[i][2]

# for d in dp:
    # print(d)

print(n-max(dp[i+1]))


n = int(input())
arr = list(map(int,input().split()))

def dfs(i, ch,days):

    if i >= len(arr):
        return days

    d1,d2,d3,d4 = 0, 0, 0, 0
    if arr[i] == 1 and ch != 1:
        d1 = dfs(i+1,1,days+1)

    elif arr[i] == 2 and ch!= 2:
        d2 = dfs(i+1, 2, days+1)

    elif arr[i] == 3:
        if ch == 1:
            d3 = dfs(i+1, 2, days+1)
        elif ch == 2:
            d3 = dfs(i+1, 1, days+1)
        else:
            d3 = max(dfs(i+1, 1, days+1), dfs(i+1, 2, days+1))
    else:
        d4 = dfs(i+1,0, days)

    return max(d1, d2, d3, d4)

print(len(arr) - dfs(0,0,0))


n = int(input())
arr = list(map(int,input().split()))

def dfs(i, ch,days):

    if i>= len(arr):
        return days

    d1,d2,d3 = 0, 0, 0
    if (arr[i] == 1 or arr[i] == 3) and ch != 1:
        d1 = dfs(i+1,1,days+1)
    elif (arr[i] == 2 or arr[i] == 3) and ch!= 2:
        d2 = dfs(i+1, 2, days+1)
    else:
        d3 = dfs(i+1,0, days)

    return max(d1, d2, d3)

print(len(arr) - dfs(0,0,0))


def solve(n, a):
    dp = [[0, 0]]
    for i in range(n):
        if a[i] == 0:
            dp.append([min(*dp[i]) + 1] * 2)
        elif a[i] == 1:
            dp.append([dp[i][1], min(*dp[i]) + 1])
        elif a[i] == 2:
            dp.append([min(*dp[i]) + 1, dp[i][0]])
        elif a[i] == 3:
            dp.append([dp[i][1], dp[i][0]])
    return(min(*dp[n]))

if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))
    print(solve(n, a))


def solve(n, a):
    dp = [[0, 0]]
    for i in range(n):
        if a[i] == 0:
            dp.append([min(*dp[i]) + 1] * 2)
        elif a[i] == 1:
            dp.append([dp[i][1], min(*dp[i]) + 1])
        elif a[i] == 2:
            dp.append([min(*dp[i]) + 1, dp[i][0]])
        elif a[i] == 3:
            dp.append([dp[i][1], dp[i][0]])
        print(min(*dp[i+1]), end=' ')

if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))
    print(solve(n, a))


def solve(n, a):
    dp = [[0, 0]]
    for i in range(n):
        if a[i] == 0:
            dp.append([min(*dp[i]) + 1] * 2)
        elif a[i] == 1:
            dp.append([dp[i][1], dp[i][0] + 1])
        elif a[i] == 2:
            dp.append([dp[i][1] + 1, dp[i][0]])
        elif a[i] == 3:
            dp.append([dp[i][1], dp[i][0]])
    return min(*dp[n])

if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))
    print(solve(n, a))


import math
import os
import random
import re
import sys
from collections import OrderedDict
def solve():
    n=int(input())
    l=list(map(int,input().strip().split()))
    st=""
    t=0
    for i in range(n):
        if l[i]==0:
               st=""
               t+=1
        if l[i]==1:
            if st=="c":
                st=""
                t+=1
            else:
                st="c"
        elif l[i]==2:
            if st=="g":
                st=""
                t+=1
            else:
                st="g"
        else:
            if st=="g":
                st="c"
            elif st=="c":
                st="g"
    print(t)

if __name__=="__main__":
    solve()


import math
import os
import random
import re
import sys
from collections import OrderedDict
def solve():
    n=int(input())
    l=list(map(int,input().strip().split()))
    st=""
    t=0
    if n==1:
        if l[0]==0:
            print(1)
        else:
            print(0)
    else:
        for i in range(n):
            if l[i]==0:
                st=""
                t+=1
            if l[i]==1:
                if st=="c":
                    st=""
                    t+=1
                else:
                    st="c"
            elif l[i]==2:
                if st=="g":
                    st=""
                    t+=1
                else:
                    st="g"
            else:
                if st=="g":
                    st="c"
                elif st=="c":
                    st="g"
        print(t)

if __name__=="__main__":
    solve()


import math
import os
import random
import re
import sys
from collections import OrderedDict
def solve():
    n=int(input())
    l=list(map(int,input().strip().split()))
    st=""
    t=0
    for i in range(n):
        if i==0:
            if l[i]==1:
                st="c"
            elif l[i]==2:
                st="g"
            elif l[i]==3:
                if l[i+1]==1:
                    st="g"
                elif l[i+1]==2:
                    st="c"
                else:
                    st=""
            else:
                t+=1
                st=""
        else:
            if l[i]==0:
                st=""
                t+=1
            if l[i]==1:
                if st=="c":
                    st=""
                    t+=1
                else:
                    st="c"
            elif l[i]==2:
                if st=="g":
                    st=""
                    t+=1
                else:
                    st="g"
            else:
                if st=="g":
                    st="c"
                elif st=="c":
                    st="g"
    print(t)

if __name__=="__main__":
    solve()


import math
import os
import random
import re
import sys
from collections import OrderedDict
def solve():
    n=int(input())
    l=list(map(int,input().strip().split()))
    st=""
    t=0
    for i in range(n):
        if i==0:
            if l[i]==1:
                st="c"
            elif l[i]==2:
                st="g"
            elif l[i]==3:
                if l[i+1]==1:
                    st="g"
                elif l[i+1]==2:
                    st="c"
                else:
                    st=""
        else:
            if l[i]==0:
                st=""
                t+=1
            if l[i]==1:
                if st=="c":
                    st=""
                    t+=1
                else:
                    st="c"
            elif l[i]==2:
                if st=="g":
                    st=""
                    t+=1
                else:
                    st="g"
            else:
                if st=="g":
                    st="c"
                elif st=="c":
                    st="g"
    print(t)

if __name__=="__main__":
    solve()


//#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<cmath>
#include<queue>
#include<stack>
#include<set>
#include<map>
#define xx first
#define yy second
#define LL long long
#define MP make_pair
#define INF 0x3f3f3f3f
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1|1
#define CLR(a, b) memset(a, b, sizeof(a))

using namespace std;

const int maxn=300300;

int n,m,k;
bool chk[maxn],vis[maxn];
set<int> _map,G[maxn];
set<int> ::iterator it;
vector<int> vec;
queue<int> Q;

bool bfs(int st,int &cnt){
    while(!Q.empty()) Q.pop();
    Q.push(st);vis[st]=1;
    cnt=0;
    while(!Q.empty()){
        int u=Q.front();Q.pop();
        vec.clear();
        for(it=_map.begin();it!=_map.end();++it){
            int v=*it;
            if(v==u||vis[v]||G[u].count(v)) continue;
            vec.push_back(v);
            Q.push(v);vis[v]=1;
        }
        for(int i=0;i<vec.size();i++){
            if(!chk[vec[i]]) cnt++;
            _map.erase(vec[i]);
        }
    }
//    printf("cnt = %d\n",cnt);
//    if(cnt==0) return 0;
    return 1;
}

void solve(){
    _map.clear();
    for(int i=1;i<=n;i++){
        if(i!=1) G[i].insert(1);
        _map.insert(i);
    }
    memset(vis,0,sizeof(vis));
    int cnt=0,num=0;
    for(int i=2;i<=n;i++) if(!vis[i]&&_map.find(i)!=_map.end()){
        int tmp=0;
        if(!bfs(i,tmp)){
            puts("impossible");
            return ;
        }
        cnt++;num+=tmp;
    }
    if(num<k){
        puts("impossible");
        return ;
    }
    puts("possible");
    return ;
}

int main(){
    while(scanf("%d%d%d",&n,&m,&k)!=EOF){
        int cnt=0;
        memset(chk,0,sizeof(chk));
        for(int i=1;i<=n;i++) G[i].clear();
        for(int i=1;i<=m;i++){
            int u,v;scanf("%d%d",&u,&v);
            if(u>v) swap(u,v);
            G[u].insert(v);G[v].insert(u);
            if(u==1) cnt++,chk[v]=1;
        }
        if(n-1-cnt<k) puts("impossible");
        else solve();
    }
}


#include <bits/stdc++.h>
#define LL long long
#define pii pair <int, int>
#define piii pair <int, pii>
#define xx first
#define yy second
#define ls rt << 1
#define rs rt << 1 | 1
#define lson ls, l, m
#define rson rs, m + 1, r
#define pis pair <int, string>
using namespace std;

const int N = 300010, M = 1000010, mod = 1e9 + 7;

int n, m, k, u, v;
int vis[N], lazy[N << 2], p[N];

//void init () {
//
//}

vector <int> g[N];

queue <int> q;

void updata (int rt, int l, int r, int tl, int tr) {
    if (tl > tr) return;
    if (lazy[rt]) return;
    if (l == r) {
        q.push (l);
        lazy[rt] = 1;
        return;
    }
    int m = l + r >> 1;
    if (tr <= m) updata (lson, tl, tr);
    else if (m < tl) updata (rson, tl, tr);
    else updata (lson, tl, m), updata (rson, m + 1, tr);
    lazy[rt] = lazy[ls] & lazy[rs];
}

void solve (int u) {
//    cout << u << endl;
    while (!q.empty ()) q.pop();
    q.push (u);
    while (!q.empty ()) {
        int u = q.front();
        q.pop();
        if (vis[u]) continue;
        vis[u] = 1;
        if (u == 1) continue;
        updata (1 ,1 ,n, u, u);
//        cout << "   " << u << endl;
//        q.pop();
        for (int i = 0; i < g[u].size() - 1; i++) {
            updata (1 ,1 ,n, g[u][i] + 1, g[u][i + 1] - 1);
        }
    }
}

int main () {
//    freopen ("in.txt", "r", stdin);
//    init ();
    cin >> n >> m >> k;
    int all = n - 1;
    for (int i = 1; i <= m; i++) {
        scanf ("%d%d", &u, &v);
        if (u > v) swap (u, v);
        if (u == 1) p[v] = 1, all--;
        g[u].push_back (v);
        g[v].push_back (u);
    }
//    cout << all << endl;
    if (all < k) {
        cout << "impossible\n";
        return 0;
    }
    for (int i = 1; i <= n; i++) {
        g[i].push_back (0);
        g[i].push_back (n + 1);
        sort (g[i].begin(), g[i].end());
    }
    int cnt = 0;
    updata (1 ,1 ,n, 1, 1);
    for (int i = 2; i <= n; i++) if (!p[i]) {
        int v = i;
        if (vis[v]) continue;
//        cout << v << endl;
        cnt++;
        solve (v);
    }
    for (int i = 2; i <= n; i++) if (!vis[i]) {
        cout << "impossible\n";
        return 0;
    }
//    cout << cnt << endl;
    if (cnt <= k) cout << "possible\n";
    else cout << "impossible\n";
}


#include <bits/stdc++.h>
#define LL long long
#define pii pair <int, int>
#define piii pair <int, pii>
#define xx first
#define yy second
#define ls rt << 1
#define rs rt << 1 | 1
#define lson ls, l, m
#define rson rs, m + 1, r
#define pis pair <int, string>
using namespace std;

const int N = 300010, M = 1000010, mod = 1e9 + 7;

int n, m, k, u, v;
int vis[N], lazy[N << 2], p[N];

//void init () {
//
//}

vector <int> g[N];

queue <int> q;

void updata (int rt, int l, int r, int tl, int tr) {
    if (tl > tr) return;
    if (lazy[rt]) return;
    if (l == r) {
        q.push (l);
        lazy[rt] = 1;
        return;
    }
    int m = l + r >> 1;
    if (tr <= m) updata (lson, tl, tr);
    else if (m < tl) updata (rson, tl, tr);
    else updata (lson, tl, m), updata (rson, m + 1, tr);
    lazy[rt] = lazy[ls] & lazy[rs];
}

void solve (int u) {
//    cout << u << endl;
    while (!q.empty ()) q.pop();
    q.push (u);
    while (!q.empty ()) {
        int u = q.front();
        q.pop();
        if (vis[u]) continue;
        vis[u] = 1;
        if (u == 1) continue;
        updata (1 ,1 ,n, u, u);
//        cout << "   " << u << endl;
//        q.pop();
        for (int i = 0; i < g[u].size() - 1; i++) {
            updata (1 ,1 ,n, g[u][i] + 1, g[u][i + 1] - 1);
        }
    }
}

int main () {
//    freopen ("in.txt", "r", stdin);
//    init ();
    cin >> n >> m >> k;
    int all = n - 1;
    for (int i = 1; i <= m; i++) {
        scanf ("%d%d", &u, &v);
        if (u > v) swap (u, v);
        if (u == 1) p[v] = 1, all--;
        g[u].push_back (v);
        g[v].push_back (u);
    }
//    cout << all << endl;
    if (all < k) {
        cout << "impossible\n";
        return 0;
    }
    for (int i = 1; i <= n; i++) {
        g[i].push_back (0);
        g[i].push_back (n + 1);
        sort (g[i].begin(), g[i].end());
    }
    int cnt = 0;
    updata (1 ,1 ,n, 1, 1);
    for (int i = 2; i <= n; i++) if (!p[i]) {
        int v = i;
        if (vis[v]) continue;
//        cout << v << endl;
        cnt++;
        solve (v);
    }
    for (int i = 2; i <= n; i++) if (!vis[i]) {
        cout << "impossible\n";
        return 0;
    }
    cout << cnt << endl;
    if (cnt <= k) cout << "possible\n";
    else cout << "impossible\n";
}


#include <iostream>
#include <set>
#include <vector>
#include <queue>
#include <algorithm>

using namespace std;

const int MAXN = 3e5 + 10;

set<int> rem;
queue<int> q;
vector<int> ng[MAXN];
bool mark[MAXN];
vector<int> comps[MAXN];

bool has_edge[MAXN];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	for (int i = 0; i < MAXN; i++)
		has_edge[i] = true;
	int n, m, k;
	cin >> n >> m >> k;
	for (int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u -= 2;
		v -= 2;
		if (u > v)
			swap(u, v);
		if (u == -1)
			has_edge[v] = false;
		else
		{
			ng[u].push_back(v);
			ng[v].push_back(u);
		}
	}
	n--;
	for (int i = 0; i < n; i++)
		rem.insert(i), sort(ng[i].begin(), ng[i].end());
	int cntId = 0;
	while (!rem.empty()) {
		int newX = *rem.begin();
		mark[newX] = true;
		rem.erase(rem.begin());
		q.push(newX);
		int compId = cntId++;
		while (!q.empty()) {
			int cur = q.front();
			comps[compId].push_back(cur);
			q.pop();
			vector<int> newlyAdd;
			for (set<int>::iterator it = rem.begin(); it != rem.end(); it++) {
				int u = *it;
				if (!binary_search(ng[cur].begin(), ng[cur].end(), u))
					newlyAdd.push_back(u), mark[u] = true, q.push(u);
			}
			for (int i = 0; i < newlyAdd.size(); i++)
				rem.erase(newlyAdd[i]);
		}
	}
	if (cntId > k)
	{
		cout << "impossible\n";
		return 0;
	}
	int rootDeg = 0;
	for (int i = 0; i < n; i++)
		if (has_edge[i])
			rootDeg++;
	if (rootDeg < k)
	{
		cout << "impossible\n";
		return 0;
	}
	for (int i = 0; i < cntId; i++) {
		bool valid = false;
		for (int j = 0; j < comps[i].size(); j++)
			if (has_edge[comps[i][j]])
				valid = true;
		if (!valid)
		{
			cout << "impossible\n";
			return 0;
		}
	}
	cout << "possible\n";
	return 0;
}


#include <iostream>
#include <set>
#include <vector>
#include <queue>
#include <algorithm>

using namespace std;

const int MAXN = 3e5 + 10;

set<int> rem;
queue<int> q;
vector<int> ng[MAXN];
bool mark[MAXN];
vector<int> comps[MAXN];

bool has_edge[MAXN];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	for (int i = 0; i < MAXN; i++)
		has_edge[i] = true;
	int n, m, k;
	cin >> n >> m >> k;
	for (int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u -= 2;
		v -= 2;
		if (u > v)
			swap(u, v);
		if (u == -1)
			has_edge[v] = false;
		else
		{
			ng[u].push_back(u);
			ng[v].push_back(v);
		}
	}
	n--;
	for (int i = 0; i < n; i++)
		rem.insert(i), sort(ng[i].begin(), ng[i].end());
	int cntId = 0;
	while (!rem.empty()) {
		int newX = *rem.begin();
		mark[newX] = true;
		rem.erase(rem.begin());
		q.push(newX);
		int compId = cntId++;
		while (!q.empty()) {
			int cur = q.front();
			comps[compId].push_back(cur);
			q.pop();
			vector<int> newlyAdd;
			for (set<int>::iterator it = rem.begin(); it != rem.end(); it++) {
				int u = *it;
				if (!binary_search(ng[cur].begin(), ng[cur].end(), u))
					newlyAdd.push_back(u), mark[u] = true, q.push(u);
			}
			for (int i = 0; i < newlyAdd.size(); i++)
				rem.erase(newlyAdd[i]);
		}
	}
	if (cntId > k)
	{
		cout << "impossible\n";
		return 0;
	}
	int rootDeg = 0;
	for (int i = 0; i < n; i++)
		if (has_edge[i])
			rootDeg++;
	if (rootDeg < k)
	{
		cout << "impossible\n";
		return 0;
	}
	for (int i = 0; i < cntId; i++) {
		bool valid = false;
		for (int j = 0; j < comps[i].size(); j++)
			if (has_edge[comps[i][j]])
				valid = true;
		if (!valid)
		{
			cout << "impossible\n";
			return 0;
		}
	}
	cout << "possible\n";
	return 0;
}


#include <bits/stdc++.h>
#define N 150000

using namespace std;

int n, m, k, deg[N], a[N], b[N], dd[N];

int main()
{
    ios_base::sync_with_stdio(false);
    //freopen("inp.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++) deg[i] = n - 1;
    for(int i = 1; i <= m; i++){
        cin >> a[i] >> b[i];
        if(a[i] == b[i]) continue;
        if(a[i] == 1) dd[b[i]] = 1;
        if(b[i] == 1) dd[a[i]] = 1;
        deg[a[i]]--;
        deg[b[i]]--;
    }
    if(deg[1] < k) {cout << "impossible"; return 0;}
    for(int i = 1; i <= n; i++) if(!deg[i]) {cout << "impossible"; return 0;}
    int cl = k - deg[1];
    int cnt = 0;
    for(int i = 2; i <= n; i++) if(!dd[i] && deg[i] > 1) cnt++;
    if(cnt >= cl) {cout << "possible"; return 0;}
    cout << "impossible";
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

set<pair<int, int> > forbidden;
set<int> remaining;
int n, m, k;

bool no_way(int u, int v){
    if(u > v) swap(u, v);
    if(forbidden.find(make_pair(u, v)) == forbidden.end()) return false;
    return true;
}

void dfs(int u){
    vector<int> now;
    set<int> :: iterator it;
    for(it = remaining.begin(); it != remaining.end(); it++){
        int b = *it;
        now.push_back(b);
    }
    for(int i = 0; i < now.size(); i++){
        int b = now[i];
        remaining.erase(b);
    }
    for(int i = 0; i < now.size(); i++){
        int b = now[i];
        dfs(b);
    }
}

int main()
{
    ios_base::sync_with_stdio(false);
    //freopen("inp.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    cin >> n >> m >> k;
    int deg = n - 1;
    for(int i = 2; i <= n; ++i) remaining.insert(i);
    for(int i = 1; i <= m; i++){
        int a, b;
        cin >> a >> b;
        if(a > b) swap(a, b);
        if(a == 1) deg--;
        forbidden.insert(make_pair(a, b));
    }
    if(deg < k) {cout << "impossible"; return 0;}
    int TPLT = 0;
    for(int i = 2; i <= n; i++) if(no_way(1, i) && remaining.find(i) != remaining.end()){
        dfs(i);
        ++TPLT;
    }
    if(!remaining.empty()) {cout << "impossible"; return 0;}
    if(TPLT > k) {cout << "impossible"; return 0;}
    cout << "possible";
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

set<pair<int,int> > nw;

bool no_way(int a, int b) {
	if(a > b) swap(a, b);
	return nw.find(make_pair(a, b)) == nw.end();
}
set<int> remaining;

void dfs(int a) {
	vector<int> memo;
	set<int> :: iterator it;
    for(it = remaining.begin(); it != remaining.end(); it++)
        if(no_way(*it, a)) memo.push_back(*it);
	for(int i = 0; i < memo.size(); i++)
		remaining.erase(memo[i]);
	for(int i = 0; i < memo.size(); i++) dfs(memo[i]);
}

int main() {
    ios_base::sync_with_stdio(false);
    //freopen("inp.txt","r",stdin);
    //freopen("out.txt","w",stdout);
	int n, m, k;
	cin >> n >> m >> k;
	for(int i = 2; i <= n; ++i) remaining.insert(i);
	int deg = n - 1;
	for(int i = 0; i < m; ++i) {
		int a, b;
		cin >> a >> b;
		if(a > b) swap(a, b);
		if(a == 1) --deg;
		nw.insert(make_pair(a, b));
	}
	if(deg < k) {cout << "impossible"; return 0;}
	int TPLT = 0;
	for(int i = 2; i <= n; ++i) if(no_way(1, i) && remaining.find(i)!=remaining.end()) {
		dfs(i);
		++TPLT;
	}
	if(!remaining.empty()) {cout << "impossible"; return 0;}
	if(TPLT > k) {cout << "impossible"; return 0;}
	cout << "possible";
	return 0;
}


#include <bits/stdc++.h>
#define N 150000

using namespace std;

int n, m, k, deg[N], a[N], b[N], dd[N];

int main()
{
    ios_base::sync_with_stdio(false);
    //freopen("inp.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++) deg[i] = n - 1;
    for(int i = 1; i <= m; i++){
        cin >> a[i] >> b[i];
        if(a[i] == b[i]) continue;
        if(a[i] == 1) dd[b[i]] = 1;
        if(b[i] == 1) dd[a[i]] = 1;
        deg[a[i]]--;
        deg[b[i]]--;
    }
    if(deg[1] < k) {cout << "impossible"; return 0;}
    for(int i = 1; i <= n; i++) if(!deg[i]) {cout << "impossible"; return 0;}
    int cl = deg[1] - k;
    int cnt = 0;
    for(int i = 2; i <= n; i++) if(!dd[i] && deg[i] > 1) cnt++;
    if(cnt >= cl) {cout << "possible"; return 0;}
    cout << "impossible";
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

set<pair<int, int> > forbidden;
set<int> remaining;
int n, m, k;

bool no_way(int u, int v){
    if(u > v) swap(u, v);
    if(forbidden.find(make_pair(u, v)) == forbidden.end()) return false;
    return true;
}

void dfs(int u){
    vector<int> now;
    set<int> :: iterator it;
    for(it = remaining.begin(); it != remaining.end(); it++){
        int b = *it;
        now.push_back(b);
    }
    for(int i = 0; i < now.size(); i++){
        int b = now[i];
        remaining.erase(b);
    }
    for(int i = 0; i < now.size(); i++){
        int b = now[i];
        dfs(b);
    }
}

int main()
{
    ios_base::sync_with_stdio(false);
    //freopen("inp.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    cin >> n >> m >> k;
    int deg = n - 1;
    for(int i = 1; i <= m; i++){
        int a, b;
        cin >> a >> b;
        if(a > b) swap(a, b);
        if(a == 1) deg--;
        forbidden.insert(make_pair(a, b));
    }
    if(deg < k) {cout << "impossible"; return 0;}
    int TPLT = 0;
    for(int i = 2; i <= n; i++) if(no_way(1, i) && remaining.find(i) != remaining.end()){
        dfs(i);
        ++TPLT;
    }
    if(!remaining.empty()) {cout << "impossible"; return 0;}
    if(TPLT > k) {cout << "impossible"; return 0;}
    cout << "possible";
    return 0;
}


#include <bits/stdc++.h>
#define N 150000

using namespace std;

int n, m, k, deg[N], a[N], b[N], dd[N];

int main()
{
    ios_base::sync_with_stdio(false);
    //freopen("inp.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++) deg[i] = n - 1;
    for(int i = 1; i <= m; i++){
        cin >> a[i] >> b[i];
        if(a[i] == b[i]) continue;
        if(a[i] == 1) dd[b[i]] = 1;
        if(b[i] == 1) dd[a[i]] = 1;
        deg[a[i]]--;
        deg[b[i]]--;
    }
    if(deg[1] < k) {cout << "Impossible"; return 0;}
    for(int i = 1; i <= n; i++) if(!deg[i]) {cout << "Impossible"; return 0;}
    int cl = k - deg[1];
    int cnt = 0;
    for(int i = 2; i <= n; i++) if(!dd[i] && deg[i] > 1) cnt++;
    if(cnt >= cl) {cout << "Possible"; return 0;}
    cout << "Impossible";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
vector<int>v;
map< pair<int,int> , bool > mp;
bool done[1000009];
int n,m,k;
void dfs(int node){
    done[node] = true;
    if(v.empty())return;
    int curr = 1;
    for(int i=v.size()-1;i>=0;i = min(i-1,(int)v.size()-1)){
        if(mp.find(make_pair(node,v[i]))==mp.end()&&v[i]!=node){
            int u = v[i];
            v.erase(v.end()-curr);
            dfs(u);
        }
        curr++;
    }
}
int main(){
    cin>>n>>m>>k;
    for(int i=0;i<m;i++){
        int a,b;
        scanf("%d%d",&a,&b);
        a--;b--;
        mp[make_pair(a,b)] = 1;
        mp[make_pair(b,a)] = 1;
    }
    for(int i=0;i<n;i++){
        v.push_back(i);
    }
    dfs(0);
    if(!v.empty()){
        cout<<"impossible"<<endl;
        exit(0);
    }
    for(int i=1;i<n;i++){
        v.push_back(i);
        done[i] = 0;
    }
    int L = 0;
    for(int i=0;i<n;i++){
        if(!done[i]){
            L++;
            dfs(i);
        }
    }
    int R = 0;
    set<int>s;
    for(map< pair<int,int> , bool>::iterator i=mp.begin();i!=mp.end();i++){
        if(i->first.first == 0){
            s.insert(i->first.second);
        }
        else if(i->first.second  == 0){
            s.insert(i->first.first);
        }
    }
    R = n - s.size();
    if(k >= L && k <= R){
        cout<<"possible"<<endl;
    }
    else{
        cout<<"impossible"<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
map< pair<int,int> , bool > mp;
set<int>s;
int n,m,k;
int done[1000009];
void dfs(int node){
    done[node] = 1;
    vector<int>v;
    for(set<int>::iterator i=s.begin();i!=s.end();i++){
        if(mp.find(make_pair(node,*i))==mp.end()&&*i!=node){
            v.push_back(*i);
        }
    }
    for(int i=0;i<v.size();i++){
        s.erase(s.find(v[i]));
    }
    for(int i=0;i<v.size();i++){
        dfs(v[i]);
    }
}
int main(){
    cin>>n>>m>>k;
    for(int i=0;i<m;i++){
        int a,b;
        scanf("%d%d",&a,&b);
        a--;b--;
        mp[make_pair(a,b)] = 1;
        mp[make_pair(b,a)] = 1;
    }
    for(int i=0;i<n;i++){
        s.insert(i);
    }
    dfs(0);
    if(!s.empty()){
        cout<<"impossible"<<endl;
        exit(0);
    }
    for(int i=1;i<n;i++){
        s.insert(i);
        done[i] = 0;
    }
    int L = 0;
    for(int i=0;i<n;i++){
        if(!done[i]){
            L++;
            dfs(i);
        }
    }
    int R = 0;
    set<int>ns;
    for(map< pair<int,int> , bool>::iterator i=mp.begin();i!=mp.end();i++){
        if(i->first.first == 0){
            ns.insert(i->first.second);
        }
        else if(i->first.second  == 0){
            ns.insert(i->first.first);
        }
    }
    R = n - ns.size();
    if(k >= L && k <= R){
        cout<<"possible"<<endl;
    }
    else{
        cout<<"impossible"<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
map< pair<int,int> , bool > mp;
set<int>s;
int n,m,k;
int done[1000009];
void dfs(int node){
    done[node] = 1;
    vector<int>v;
    for(set<int>::iterator i=s.begin();i!=s.end();i++){
        if(mp.find(make_pair(node,*i))==mp.end()&&*i!=node){
            v.push_back(*i);
        }
    }
    for(int i=0;i<v.size();i++){
        s.erase(s.find(v[i]));
    }
    for(int i=0;i<v.size();i++){
        dfs(v[i]);
    }
}
int main(){
    cin>>n>>m>>k;
    for(int i=0;i<m;i++){
        int a,b;
        scanf("%d%d",&a,&b);
        a--;b--;
        mp[make_pair(a,b)] = 1;
        mp[make_pair(b,a)] = 1;
    }
    for(int i=0;i<n;i++){
        s.insert(i);
    }
    dfs(0);
    if(!s.empty()){
        cout<<"impossible"<<endl;
        exit(0);
    }
    for(int i=1;i<n;i++){
        s.insert(i);
        done[i] = 0;
    }
    int L = 0;
    for(int i=0;i<n;i++){
        if(!done[i]){
            L++;
            dfs(i);
        }
    }
    int R = 0;
    set<int>ns;
    for(map< pair<int,int> , bool>::iterator i=mp.begin();i!=mp.end();i++){
        if(i->first.first == 0){
            ns.insert(i->first.second);
        }
        else if(i->first.second  == 0){
            ns.insert(i->first.first);
        }
    }
    R = n - ns.size() - 1;
    if(k >= L && k <= R){
        cout<<"possible"<<endl;
    }
    else{
        cout<<"impossible"<<endl;
    }
}


#include <iostream>
#include <algorithm>
#include <set>
using namespace std;
set <pair <int,int> > prohibidas;
set <int> quedan;
int i,j,n,m,k,u,v,partes,d;
void dfs(int x){
    set <int,int> :: iterator it;
    quedan.erase(x);
    int aux;
    it=quedan.begin();
    while(it!=quedan.end()){
        if (prohibidas.find(make_pair(min(x,*it),max(x,*it))) == prohibidas.end() && *it!=x){
            aux=(*it);
            dfs(*it);
            it=quedan.lower_bound(aux);
        }
        else
            it++;
    }
}
int main()
{
    ios::sync_with_stdio(false);
    cin>>n>>m>>k;
    d=n-1;
    for (i=0;i<m;i++){
        cin>>u>>v;
        if (u==1 || v==1)
            d--;
        prohibidas.insert(make_pair(min(u,v),max(u,v)));
    }
    for (i=1;i<=n;i++)
        quedan.insert(i);
    dfs(1);
    if (!quedan.empty()){
        cout<<"impossible";
        return 0;
    }
    for (i=2;i<=n;i++)
        quedan.insert(i);
    for (i=2;i<=n;i++)
    if (quedan.find(i)!=quedan.end() && prohibidas.find(make_pair(1,i))==prohibidas.end()){
        partes++;
        dfs(i);
    }
    if (quedan.empty() && k>=partes && k<=d)
        cout<<"possible";
    else
        cout<<"impossible";
    return 0;
}


#include<cstdio>
#include<iostream>
#include<set>
using namespace std;
const int N=300010;
int n,m,k,f;
int v[N];
set<int> c[N];
set<int> S;
void dfs(int i)
{
	S.erase(i);
	v[i]=1;
	set<int>::iterator it;
	int j;
	for (it=S.begin();it!=S.end();it=S.upper_bound(j))
	{

		j=(*it);
		if (i==j) continue;
		if (c[i].count(j)) continue;
		if (j==1) 	{ f=1;continue;}
		dfs(j);
	}
}
int main()
{
	scanf("%d%d%d",&n,&m,&k);
	int d=n-1;
	for (int i=1;i<=m;i++)
	{
		int x,y;
		scanf("%d%d",&x,&y);
		c[x].insert(y);
		c[y].insert(x);
		if (x==1||y==1) d--;
	}
	if (d<k) { printf("impossible\n");return 0;}
	int cnt=0,flag=0;
	S.clear();
	for (int i=1;i<=n;i++) S.insert(i);
	for (int i=2;i<=n;i++)
	if (!v[i])
	{
		f=0;
		dfs(i);
		cnt++;
		if (!f) flag=1;
	}
	if (flag) { printf("impossible\n");return 0;}
	if (cnt<=k) printf("possible\n");
	else printf("impossible\n");
	return 0;
}


#include<bits/stdc++.h>
#define YES "possible"
#define NO "impossible"
using namespace std;

int n,m,k;
set<int> s;
set< pair<int,int> > edge;

void read(int &x){
    char ch=getchar();
	x=0;
    while (ch<'0'||ch>'9')
		ch=getchar();
    while (ch<='9'&&ch>='0')
    	{
    		x=x*10+ch-48;
			ch=getchar();
		}
}

bool check(int x,int y){
	if (x>y)
		swap(x,y);
	return edge.find(make_pair(x,y))==edge.end();
}

void dfs(int x){
	vector<int> temp;
	temp.clear();
	for (set<int>::iterator i=s.begin();i!=s.end();i++)
		{
			int y=*i;
			if (check(x,y))
				temp.push_back(y);
		}
	for (int i=0;i<temp.size();i++)
		s.erase(temp[i]);
	for (int i=0;i<temp.size();i++)
		dfs(temp[i]);
}

int main(){
	read(n);
	read(m);
	read(k);
	int deg=n-1;
	s.clear();
	edge.clear();
	for (int i=2;i<=n;i++)
		s.insert(i);
	int x,y;
	for (int i=1;i<=m;i++)
		{
			read(x);
			read(y);
			if (x>y)
				swap(x,y);
			if (x==1)
				deg--;
			edge.insert(make_pair(x,y));
		}
	if (deg<k)
		{
			puts(NO);
			return 0;
		}
	int ans=0;
	for (int i=2;i<=n;i++)
		if (check(1,i)&&s.count(i))
			{
				dfs(i);
				ans++;
			}
	if (ans>k||!s.empty())
		{
			puts(NO);
			return 0;
		}
	else
		{
			puts(YES);
			return 0;
		}
	return 0;
}


#include<cstring>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<queue>
#include<cmath>
#include<set>
#define rep(i,l,r) for (int i=l;i<=r;i++)
#define down(i,l,r) for (int i=l;i>=r;i--)
#define clr(x,y) memset(x,y,sizeof(x))
#define maxn 300500
#define inf 100000000
#define eps 1e-8
#define ll long long
using namespace std;
struct data{int obj,pre;
}e[maxn*2];
int pre[maxn],next[maxn],b[maxn],head[maxn],vis[maxn],d[maxn];
int tot,n,m,ans,k;
queue<int> q;
set<int> s;
int read(){
    int x=0,f=1; char ch=getchar();
    while (!isdigit(ch)){if (ch=='-') f=-1; ch=getchar();}
    while (isdigit(ch)){x=x*10+ch-'0'; ch=getchar();}
    return x*f;
}
void insert(int x,int y){
	e[++tot].obj=y; e[tot].pre=head[x]; head[x]=tot; d[x]++;
}
void bfs(int u){
	while (!q.empty()){
		int u=q.front(); q.pop();
		ans++;
		for (int j=head[u];j;j=e[j].pre) vis[e[j].obj]=1;
		int i=-inf;
		while (1){
			i=*s.upper_bound(i);
			if (i==inf) break;
			if (!vis[i]) s.erase(i),q.push(i);
		}
		for (int j=head[u];j;j=e[j].pre) vis[e[j].obj]=0;
	}
}
int main(){
  //	freopen("in.txt","r",stdin);
 	n=read(); m=read(); k=read();
 	rep(i,0,n) next[i]=i+1;
 	rep(i,1,n+1) pre[i]=i-1;
	rep(i,1,m){
 		int x=read(),y=read();
 		insert(x,y); insert(y,x);
 	}
 	if (n-d[1]-1<k) {puts("impossible"); return 0;}
 	ans=1;
 	s.insert(-inf); s.insert(inf);
 	rep(i,2,n) s.insert(i);
 	for (int j=head[1];j;j=e[j].pre) b[e[j].obj]=1;
 	int cnt=0;
 	rep(i,2,n) if (s.count(i)&&!b[i]){
 		q.push(i); s.erase(i);
		bfs(i); cnt++;
 	}
 	if (cnt>k) {puts("impossible"); return 0;}
 	if (ans!=n) puts("impossible");
 	else puts("possible");
	return 0;
}


#include<cstring>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<queue>
#include<cmath>
#define rep(i,l,r) for (int i=l;i<=r;i++)
#define down(i,l,r) for (int i=l;i>=r;i--)
#define clr(x,y) memset(x,y,sizeof(x))
#define maxn 300500
#define inf 1000000000
#define eps 1e-8
#define ll long long
using namespace std;
struct data{int obj,pre;
}e[maxn*2];
int pre[maxn],next[maxn],head[maxn],vis[maxn],d[maxn];
int tot,n,m,ans,k;
int read(){
    int x=0,f=1; char ch=getchar();
    while (!isdigit(ch)){if (ch=='-') f=-1; ch=getchar();}
    while (isdigit(ch)){x=x*10+ch-'0'; ch=getchar();}
    return x*f;
}
void insert(int x,int y){
	e[++tot].obj=y; e[tot].pre=head[x]; head[x]=tot; d[x]++;
}
void del(int x){
	pre[next[x]]=pre[x];
	next[pre[x]]=next[x];
}
/*void bfs(int u){
	queue<int> q; q.push(1);
	while (!q.empty()){
		int u=q.front(); q.pop();
		ans++;
		for (int j=head[u];j;j=e[j].pre) vis[e[j].obj]=1;
		for (int i=next[0];i<=n;i=next[i])
			if (!vis[i]) del(i),q.push(i);
		for (int j=head[u];j;j=e[j].pre) vis[e[j].obj]=0;
	}
}*/
int main(){
  //	freopen("in.txt","r",stdin);
 	n=read(); m=read(); k=read();
 	rep(i,0,n) next[i]=i+1;
 	rep(i,1,n+1) pre[i]=i-1;
	rep(i,1,m){
 		int x=read(),y=read();
 		insert(x,y); insert(y,x);
 	}
 	if (n-d[1]-1<k) {puts("impossible"); return 0;}
 	del(1); ans=1;
 	queue<int> q;
 	for (int j=head[1];j;j=e[j].pre) vis[e[j].obj]=1;
 	int cnt=0; rep(i,2,n) if (!vis[i]&&cnt<k) del(i),q.push(i),cnt++;
	for (int j=head[1];j;j=e[j].pre) vis[e[j].obj]=0;
	while (!q.empty()){
		int u=q.front(); q.pop();
		ans++;
		for (int j=head[u];j;j=e[j].pre) vis[e[j].obj]=1;
		for (int i=next[0];i<=n;i=next[i])
			if (!vis[i]) del(i),q.push(i);
		for (int j=head[u];j;j=e[j].pre) vis[e[j].obj]=0;
	}
 	if (ans!=n) puts("impossible");
 	else puts("possible");
	return 0;
}


#include<cstring>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<queue>
#include<cmath>
#define rep(i,l,r) for (int i=l;i<=r;i++)
#define down(i,l,r) for (int i=l;i>=r;i--)
#define clr(x,y) memset(x,y,sizeof(x))
#define maxn 300500
#define inf 1000000000
#define eps 1e-8
#define ll long long
using namespace std;
struct data{int obj,pre;
}e[maxn*2];
int pre[maxn],next[maxn],head[maxn],vis[maxn],d[maxn];
int tot,n,m,ans,k;
int read(){
    int x=0,f=1; char ch=getchar();
    while (!isdigit(ch)){if (ch=='-') f=-1; ch=getchar();}
    while (isdigit(ch)){x=x*10+ch-'0'; ch=getchar();}
    return x*f;
}
void insert(int x,int y){
	e[++tot].obj=y; e[tot].pre=head[x]; head[x]=tot; d[x]++;
}
void del(int x){
	pre[next[x]]=pre[x];
	next[pre[x]]=next[x];
}
void bfs(int u){
	queue<int> q; q.push(1);
	while (!q.empty()){
		int u=q.front(); q.pop();
		ans++;
		for (int j=head[u];j;j=e[j].pre) vis[e[j].obj]=1;
		for (int i=next[0];i<=n;i=next[i])
			if (!vis[i]) del(i),q.push(i);
		for (int j=head[u];j;j=e[j].pre) vis[e[j].obj]=0;
	}
}
int main(){
  //	freopen("in.txt","r",stdin);
 	n=read(); m=read(); k=read();
 	rep(i,0,n) next[i]=i+1;
 	rep(i,1,n+1) pre[i]=i-1;
	rep(i,1,m){
 		int x=read(),y=read();
 		insert(x,y); insert(y,x);
 	}
 	if (n-d[1]-1<k) {puts("impossible"); return 0;}
 	del(1); bfs(1);
 	if (ans!=n) puts("impossible");
 	else puts("possible");
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

const int MAXN = 300005;
vector<int> comp[MAXN];
bool done[MAXN];

int n;
vector<int> getComp(int start)
{
	vector<int> bad = comp[start];
	vector<int> bad2;
	queue<int> q;
	for (int i = 1; i < n; i++)
	{
		if (!binary_search(bad.begin(), bad.end(), i))
			q.push(i);
	}
	vector<int> cmp;
	cmp.push_back(start);
	done[start] = true;
	while (!q.empty())
	{
		int cur = q.front();
		q.pop();
		if (cur == 0)
			continue;
		if (done[cur])
			continue;
		done[cur] = true;
		cmp.push_back(cur);
		bad2.clear();
		for (int i = 0; i < bad.size(); i++)
		{
			if (binary_search(comp[cur].begin(), comp[cur].end(), bad[i]))
			{
				bad2.push_back(bad[i]);
			}
			else
				q.push(bad[i]);
		}
		bad = bad2;
	}
	return cmp;
}

bool solve(int k)
{
	for (int i = 0; i < n; i++)
		sort(comp[i].begin(), comp[i].end());
	memset(done, 0, sizeof(done));
	int cnt = 0;
	if (n-1-(int)comp[0].size() < k)
		return false;
	//cout<<"HERE"<<endl;
	for (int i = 1; i < n; i++)
	{
		if (done[i])
			continue;
	//	cout<<"here "<<i<<" "<<endl;
		cnt++;
		vector<int> cmp = getComp(i);
		bool ok = false;
		for (int j = 0; j < cmp.size(); j++)
		{
			if (binary_search(comp[0].begin(), comp[0].end(), cmp[j]))
				ok = true;
		}
		if (!ok)
			return false;
	}
//	cout<<"HERE"<<endl;
	if (n > 1000)
		cout<<cnt<<endl;
	return cnt <= k;
}

int main()
{
	int m, k;
	scanf("%d %d %d", &n, &m, &k);
	for (int i = 0; i < m; i++)
	{
		int x, y;
		scanf("%d %d", &x, &y);
		x--;
		y--;
		comp[x].push_back(y);
		comp[y].push_back(x);
	}
	bool res = solve(k);
	if (res)
		printf("possible\n");
	else
		printf("impossible\n");
}


#include <bits/stdc++.h>
using namespace std;

const int MAXN = 300005;
vector<int> comp[MAXN];
bool done[MAXN];

int n;
vector<int> getComp(int start)
{
	vector<int> bad = comp[start];
	vector<int> bad2;
	queue<int> q;
	for (int i = 1; i < n; i++)
	{
		if (!binary_search(bad.begin(), bad.end(), i))
			q.push(i);
	}
	vector<int> cmp;
	cmp.push_back(start);
	done[start] = true;
	while (!q.empty())
	{
		int cur = q.front();
		q.pop();
		if (cur == 0)
			continue;
		if (done[cur])
			continue;
		done[cur] = true;
		cmp.push_back(cur);
		bad2.clear();
		for (int i = 0; i < bad.size(); i++)
		{
			if (binary_search(comp[cur].begin(), comp[cur].end(), bad[i]))
			{
				bad2.push_back(bad[i]);
			}
			else
				q.push(bad[i]);
		}
		bad = bad2;
	}
	return cmp;
}

bool solve(int k)
{
	for (int i = 0; i < n; i++)
		sort(comp[i].begin(), comp[i].end());
	memset(done, 0, sizeof(done));
	int cnt = 0;
	if (n-1-(int)comp[0].size() < k)
		return false;

	for (int i = 1; i < n; i++)
	{
		if (done[i])
			continue;
		cnt++;
		vector<int> cmp = getComp(i);
		bool ok = false;
		for (int j = 0; j < cmp.size(); j++)
		{
			if (!binary_search(comp[0].begin(), comp[0].end(), cmp[j]))
				ok = true;
		}
		if (!ok)
			return false;
	}
	return cnt <= k;
}

int main()
{
	int m, k;
	scanf("%d %d %d", &n, &m, &k);
	for (int i = 0; i < m; i++)
	{
		int x, y;
		scanf("%d %d", &x, &y);
		x--;
		y--;
		comp[x].push_back(y);
		comp[y].push_back(x);
	}
	bool res = solve(k);
	if (res)
		printf("possible\n");
	else
		printf("impossible\n");
}


#include <bits/stdc++.h>
using namespace std;

const int MAXN = 300005;
vector<int> comp[MAXN];
bool done[MAXN];

int n;
vector<int> getComp(int start)
{
	vector<int> bad = comp[start];
	vector<int> bad2;
	queue<int> q;
	for (int i = 1; i < n; i++)
	{
		if (!binary_search(bad.begin(), bad.end(), i))
			q.push(i);
	}
	vector<int> cmp;
	cmp.push_back(start);
	done[start] = true;
	while (!q.empty())
	{
		int cur = q.front();
		q.pop();
		if (cur == 0)
			continue;
		if (done[cur])
			continue;
		done[cur] = true;
		cmp.push_back(cur);
		bad2.clear();
		for (int i = 0; i < bad.size(); i++)
		{
			if (binary_search(comp[cur].begin(), comp[cur].end(), bad[i]))
			{
				bad2.push_back(bad[i]);
			}
			else
				q.push(bad[i]);
		}
		bad = bad2;
	}
	return cmp;
}

bool solve(int k)
{
	for (int i = 0; i < n; i++)
		sort(comp[i].begin(), comp[i].end());
	memset(done, 0, sizeof(done));
	int cnt = 0;
	if (n-1-(int)comp[0].size() < k)
		return false;

	for (int i = 1; i < n; i++)
	{
		if (done[i])
			continue;
		cnt++;
		vector<int> cmp = getComp(i);
		bool ok = false;
		for (int j = 0; j < cmp.size(); j++)
		{
			if (binary_search(comp[0].begin(), comp[0].end(), cmp[j]))
				ok = true;
		}
		if (n > 1000)
		{
			if (!ok)
				cout<<cnt<<" "<<i<<endl;
		}
		if (!ok)
			return false;
	}
//	cout<<"HERE"<<endl;
	if (n > 1000)
		cout<<cnt<<endl;
	return cnt <= k;
}

int main()
{
	int m, k;
	scanf("%d %d %d", &n, &m, &k);
	for (int i = 0; i < m; i++)
	{
		int x, y;
		scanf("%d %d", &x, &y);
		x--;
		y--;
		comp[x].push_back(y);
		comp[y].push_back(x);
	}
	bool res = solve(k);
	if (res)
		printf("possible\n");
	else
		printf("impossible\n");
}


#include <bits/stdc++.h>
using namespace std;

const int MAXN = 300005;
vector<int> comp[MAXN];
bool done[MAXN];

int n;
vector<int> getComp(int start)
{
	vector<int> bad = comp[start];
	vector<int> bad2;
	queue<int> q;
	for (int i = 1; i < n; i++)
	{
		if (!binary_search(bad.begin(), bad.end(), i))
			q.push(i);
	}
	vector<int> cmp;
	cmp.push_back(start);
	done[start] = true;
	while (!q.empty())
	{
		int cur = q.front();
		q.pop();
		if (cur == 0)
			continue;
		if (done[cur])
			continue;
		done[cur] = true;
		cmp.push_back(cur);
		bad2.clear();
		for (int i = 0; i < bad.size(); i++)
		{
			if (binary_search(comp[cur].begin(), comp[cur].end(), bad[i]))
			{
				bad2.push_back(bad[i]);
			}
			else
				q.push(bad[i]);
		}
		bad = bad2;
	}
	return cmp;
}

bool solve(int k)
{
	for (int i = 0; i < n; i++)
		sort(comp[i].begin(), comp[i].end());
	memset(done, 0, sizeof(done));
	int cnt = 0;
	if (n-1-(int)comp[0].size() < k)
		return false;
	//cout<<"HERE"<<endl;
	for (int i = 1; i < n; i++)
	{
		if (done[i])
			continue;
	//	cout<<"here "<<i<<" "<<endl;
		cnt++;
		vector<int> cmp = getComp(i);
		bool ok = false;
		for (int j = 0; j < cmp.size(); j++)
		{
			if (binary_search(comp[0].begin(), comp[0].end(), cmp[j]))
				ok = true;
		}
		if (!ok)
			return false;
	}
//	cout<<"HERE"<<endl;
	return cnt <= k;
}

int main()
{
	int m, k;
	scanf("%d %d %d", &n, &m, &k);
	for (int i = 0; i < m; i++)
	{
		int x, y;
		scanf("%d %d", &x, &y);
		x--;
		y--;
		comp[x].push_back(y);
		comp[y].push_back(x);
	}
	bool res = solve(k);
	if (res)
		printf("possible\n");
	else
		printf("impossible\n");
}


#include <bits/stdc++.h>
using namespace std;

const int MAXN = 300005;
vector<int> comp[MAXN];
bool done[MAXN];

int n;
vector<int> getComp(int start)
{
	vector<int> bad = comp[start];
	vector<int> bad2;
	queue<int> q;
	for (int i = 1; i < n; i++)
	{
		if (!binary_search(bad.begin(), bad.end(), i))
			q.push(i);
	}
	vector<int> cmp;
	cmp.push_back(start);
	done[start] = true;
	while (!q.empty())
	{
		int cur = q.front();
		q.pop();
		if (cur == 0)
			continue;
		if (done[cur])
			continue;
		done[cur] = true;
		cmp.push_back(cur);
		q.pop();
		bad2.clear();
		for (int i = 0; i < bad.size(); i++)
		{
			if (binary_search(comp[cur].begin(), comp[cur].end(), bad[i]))
			{
				bad2.push_back(bad[i]);
			}
			else
				q.push(bad[i]);
		}
		bad = bad2;
	}
	return cmp;
}

bool solve(int k)
{
	for (int i = 0; i < n; i++)
		sort(comp[i].begin(), comp[i].end());
	memset(done, 0, sizeof(done));
	int cnt = 0;
	if (n-1-(int)comp[0].size() < k)
		return false;
	//cout<<"HERE"<<endl;
	for (int i = 1; i < n; i++)
	{
		if (done[i])
			continue;
	//	cout<<"here "<<i<<" "<<endl;
		cnt++;
		vector<int> cmp = getComp(i);
		bool ok = false;
		for (int j = 0; j < cmp.size(); j++)
		{
			if (binary_search(comp[0].begin(), comp[0].end(), cmp[j]))
				ok = true;
		}
		if (!ok)
			return false;
	}
//	cout<<"HERE"<<endl;
	return cnt <= k;
}

int main()
{
	int m, k;
	scanf("%d %d %d", &n, &m, &k);
	for (int i = 0; i < m; i++)
	{
		int x, y;
		scanf("%d %d", &x, &y);
		x--;
		y--;
		comp[x].push_back(y);
		comp[y].push_back(x);
	}
	bool res = solve(k);
	if (res)
		printf("possible\n");
	else
		printf("impossible\n");
}


// In the name of God

#include <bits/stdc++.h>

#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define an size()

using namespace std;
const ll maxn=3e5+500;
vector<ll> ger[maxn];
ll moa[maxn];
ll gg[maxn];
ll n;
void okeyed (ll a)
{
    ll savea=a;
    vector<ll> ham;
    vector<ll> ham2;
    vector<ll> tofale;
    for(ll i=0; i<ger[a].an; i++)
    {
        ham.pb(ger[a][i]);
    }
    ham.pb(maxn*50);
    tofale.pb(a);

    ll j=0,v,u=0;
    while(tofale.size()||j<n)
    {
        if(tofale.empty())
        {
            while(u<ham.size()&&j<n)
            {
                if(ham[u]==j)
                {
                    u++;
                    j++;
                }
                else if(ham[u]>j)
                {
                    if(moa[j]==-1)
                    {
                        tofale.pb(j);
                        break;
                    }
                    j++;
                }
                else if(ham[u]<j)
                {
                    u++;
                }
            }
        }
        else
        {
            ll ppu=ham[u];
            ham.pop_back();
            u=-1;
            v=tofale.back();
            tofale.pop_back();
            moa[v]=savea;
            ll p1=0;
            ll p2=0;
            while(p1<ham.size()&&p2<ger[v].size())
            {
                if(ham[p1]==ger[v][p2])
                {
                    if(ger[v][p2]>=ppu)
                    {
                        u=ham2.size();
                        ppu=maxn*50;
                    }
                    ham2.pb(ger[v][p2]);
                    p1++;
                    p2++;
                }
                else if(ham[p1]<ger[v][p2])
                {
                    tofale.pb(ham[p1]);
                    p1++;
                }
                else
                {
                    p2++;
                }
            }
            while(p1<ham.size())
            {
                tofale.pb(ham[p1]);
                p1++;
            }
            if(u==-1)
            {
                u=ham2.size();
            }
            ham.clear();
            swap(ham,ham2);
            ham.pb(maxn*50);
        }
    }
}
vector<ll> ans[maxn];
vector<ll> ger1;
int main()
{
    ios_base::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);
    ll m,k,v,u;
    for(ll j=0; j<maxn; j++)
    {
        moa[j]=-1;
    }
    cin>>n>>m>>k;
    n--;
    for(ll i=0; i<m; i++)
    {
        cin>>v>>u;
        if(v!=1&&u!=1)
        {
            u-=2;
            v-=2;
            ger[u].pb(v);
            ger[v].pb(u);
        }
        else
        {
            if(v==1)ger1.pb((u-2));
            else ger1.pb((u-2));
        }
    }
    if(n-ger1.an<k)
    {
          cout<<"impossible";
          return 0;
    }

    for(ll i=0; i<n; i++)
    {
        sort(ger[i].begin(),ger[i].end());
    }
    for(ll i=0; i<n; i++)
    {
        if(moa[i]==-1)
        {
            okeyed(i);
        }
    }
    vector<ll> root;
    for(ll i=0; i<n; i++)
    {
        if(moa[i]==i)
        {
            root.pb(i);
        }
    }
    if(root.size()>k)
    {
        cout<< "impossible";
        return 0;
    }
    for(ll i=0; i<n; i++)
    {
        gg[moa[i]]++;
    }
    for(ll i=0; i<ger1.an; i++)
    {
        v=ger1[i];
        gg[moa[v]]--;
    }
    for(ll i=0; i<root.an; i++)
    {
        v=root[i];
        if(gg[v]<=0)
        {
            cout<< "impossible";
            return 0;
        }
    }
    cout<<"possible";

}


// In the name of God

#include <bits/stdc++.h>

#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define an size()

using namespace std;
const ll maxn=3e5+500;
vector<ll> ger[maxn];
ll moa[maxn];
ll gg[maxn];
ll n;
void okeyed (ll a)
{
    ll savea=a;
    vector<ll> ham;
    vector<ll> ham2;
    vector<ll> tofale;
    for(ll i=0; i<ger[a].an; i++)
    {
        ham.pb(ger[a][i]);
    }
    ham.pb(maxn*50);
    tofale.pb(a);

    ll j=0,v,u=0;
    while(tofale.size()||j<n)
    {
        if(tofale.empty())
        {
            while(u<ham.size()&&j<n)
            {
                if(ham[u]==j)
                {
                    u++;
                    j++;
                }
                else if(ham[u]>j)
                {
                    if(moa[j]==-1)
                    {
                        tofale.pb(j);
                        break;
                    }
                    j++;
                }
                else if(ham[u]<j)
                {
                    u++;
                }
            }
        }
        else
        {
            ll ppu=ham[u];
            ham.pop_back();
            u=-1;
            v=tofale.back();
            tofale.pop_back();
            moa[v]=savea;
            ll p1=0;
            ll p2=0;
            while(p1<ham.size()&&p2<ger[v].size())
            {
                if(ham[p1]==ger[v][p2])
                {
                    if(ger[v][p2]>=ppu)
                    {
                        u=ham2.size();
                        ppu=maxn*50;
                    }
                    ham2.pb(ger[v][p2]);
                    p1++;
                    p2++;
                }
                else if(ham[p1]<ger[v][p2])
                {
                    tofale.pb(ham[p1]);
                    p1++;
                }
                else
                {
                    p2++;
                }
            }
            while(p1<ham.size())
            {
                tofale.pb(ham[p1]);
                p1++;
            }
            if(u==-1)
            {
                u=ham2.size();
            }
            ham.clear();
            swap(ham,ham2);
            ham.pb(maxn*50);
        }
    }
}
vector<ll> ans[maxn];
vector<ll> ger1;
int main()
{
    ios_base::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);
    ll m,k,v,u;
    for(ll j=0; j<maxn; j++)
    {
        moa[j]=-1;
    }
    cin>>n>>m>>k;
    n--;
    for(ll i=0; i<m; i++)
    {
        cin>>v>>u;
        if(v!=1&&u!=1)
        {
            u-=2;
            v-=2;
            ger[u].pb(v);
            ger[v].pb(u);
        }
        else
        {
            if(v==1)ger1.pb((u-2));
            else ger1.pb((u-2));
        }
    }
    n++;
    if(n-1-ger1.an<k)
    {
          cout<<"impossible";
          return 0;
    }
    n--;

    for(ll i=0; i<n; i++)
    {
        sort(ger[i].begin(),ger[i].end());
    }
    for(ll i=0; i<n; i++)
    {
        if(moa[i]==-1)
        {
            okeyed(i);
        }
    }
    vector<ll> root;
    for(ll i=0; i<n; i++)
    {
        if(moa[i]==i)
        {
            root.pb(i);
        }
    }
    if(root.size()>k)
    {
        cout<< "impossible";
        return 0;
    }
    for(ll i=1; i<n; i++)
    {
        gg[moa[i]]++;
    }
    for(ll i=0; i<ger1.an; i++)
    {
        v=ger1[i];
        gg[moa[v]]--;
    }
    for(ll i=0; i<root.an; i++)
    {
        v=root[i];
        if(gg[v]<0)
        {
            cout<< "impossible";
            return 0;
        }
    }
    cout<<"possible";

}


// In the name of God

#include <bits/stdc++.h>

#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define an size()

using namespace std;
const ll maxn=3e5+500;
vector<ll> ger[maxn];
ll moa[maxn];
ll gg[maxn];
ll n;
void okeyed (ll a)
{
    ll savea=a;
    vector<ll> ham;
    vector<ll> ham2;
    vector<ll> tofale;
    for(ll i=0; i<ger[a].an; i++)
    {
        ham.pb(ger[a][i]);
    }
    ham.pb(maxn*50);
    tofale.pb(a);

    ll j=0,v,u=0;
    while(tofale.size()||j<n)
    {
        if(tofale.empty())
        {
            while(u<ham.size()&&j<n)
            {
                if(ham[u]==j)
                {
                    u++;
                    j++;
                }
                else if(ham[u]>j)
                {
                    if(moa[j]==-1)
                    {
                        tofale.pb(j);
                        break;
                    }
                    j++;
                }
                else if(ham[u]<j)
                {
                    u++;
                }
            }
        }
        else
        {
            ll ppu=ham[u];
            ham.pop_back();
            u=-1;
            v=tofale.back();
            tofale.pop_back();
            moa[v]=savea;
            ll p1=0;
            ll p2=0;
            while(p1<ham.size()&&p2<ger[v].size())
            {
                if(ham[p1]==ger[v][p2])
                {
                    if(ger[v][p2]>=ppu)
                    {
                        u=ham2.size();
                        ppu=maxn*50;
                    }
                    ham2.pb(ger[v][p2]);
                    p1++;
                    p2++;
                }
                else if(ham[p1]<ger[v][p2])
                {
                    tofale.pb(ham[p1]);
                    p1++;
                }
                else
                {
                    p2++;
                }
            }
            while(p1<ham.size())
            {
                tofale.pb(ham[p1]);
                p1++;
            }
            if(u==-1)
            {
                u=ham2.size();
            }
            ham.clear();
            swap(ham,ham2);
            ham.pb(maxn*50);
        }
    }
}
vector<ll> ans[maxn];
vector<ll> ger1;
int main()
{
    ios_base::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);
    ll m,k,v,u;
    for(ll j=0; j<maxn; j++)
    {
        moa[j]=-1;
    }
    cin>>n>>m>>k;
    n--;
    for(ll i=0; i<m; i++)
    {
        cin>>v>>u;
        if(v!=1&&u!=1)
        {
            u-=2;
            v-=2;
            ger[u].pb(v);
            ger[v].pb(u);
        }
        else
        {
            if(v==1)ger1.pb((u-2));
            else ger1.pb((u-2));
        }
    }
    if(n-ger1.an<k)
    {
          cout<<"     impossible";
          return 0;
    }

    for(ll i=0; i<n; i++)
    {
        sort(ger[i].begin(),ger[i].end());
    }
    for(ll i=0; i<n; i++)
    {
        if(moa[i]==-1)
        {
            okeyed(i);
        }
    }
    vector<ll> root;
    for(ll i=0; i<n; i++)
    {
        if(moa[i]==i)
        {
            root.pb(i);
        }
    }
    if(root.size()>k)
    {
        cout<< "impossible";
        return 0;
    }
    for(ll i=0; i<n; i++)
    {
        gg[moa[i]]++;
    }
    for(ll i=0; i<ger1.an; i++)
    {
        v=ger1[i];
        gg[moa[v]]--;
    }
    for(ll i=0; i<root.an; i++)
    {
        v=root[i];
        if(gg[v]<=0)
        {
            cout<< "                      impossible";
            return 0;
        }
    }
    cout<<"possible";

}


// In the name of God

#include <bits/stdc++.h>

#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define an size()

using namespace std;
const ll maxn=3e5+500;
vector<ll> ger[maxn];
ll moa[maxn];
ll gg[maxn];
ll n;
void okeyed (ll a)
{
    ll savea=a;
    vector<ll> ham;
    vector<ll> ham2;
    vector<ll> tofale;
    for(ll i=0; i<ger[a].an; i++)
    {
        ham.pb(ger[a][i]);
    }
    ham.pb(maxn*50);
    tofale.pb(a);

    ll j=0,v,u=0;
    while(tofale.size()||j<n)
    {
        if(tofale.empty())
        {
            while(u<ham.size()&&j<n)
            {
                if(ham[u]==j)
                {
                    u++;
                    j++;
                }
                else if(ham[u]>j)
                {
                    if(moa[j]==-1)
                    {
                        tofale.pb(j);
                        break;
                    }
                    j++;
                }
                else if(ham[u]<j)
                {
                    u++;
                }
            }
        }
        else
        {
            ll ppu=ham[u];
            ham.pop_back();
            u=-1;
            v=tofale.back();
            tofale.pop_back();
            moa[v]=savea;
            ll p1=0;
            ll p2=0;
            while(p1<ham.size()&&p2<ger[v].size())
            {
                if(ham[p1]==ger[v][p2])
                {
                    if(ger[v][p2]>=ppu)
                    {
                        u=ham2.size();
                        ppu=maxn*50;
                    }
                    ham2.pb(ger[v][p2]);
                    p1++;
                    p2++;
                }
                else if(ham[p1]<ger[v][p2])
                {
                    tofale.pb(ham[p1]);
                    p1++;
                }
                else
                {
                    p2++;
                }
            }
            while(p1<ham.size())
            {
                tofale.pb(ham[p1]);
                p1++;
            }
            if(u==-1)
            {
                u=ham2.size();
            }
            ham.clear();
            swap(ham,ham2);
            ham.pb(maxn*50);
        }
    }
}
vector<ll> ans[maxn];
vector<ll> ger1;
int main()
{
    ios_base::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);
    ll m,k,v,u;
    for(ll j=0; j<maxn; j++)
    {
        moa[j]=-1;
    }
    cin>>n>>m>>k;
    n--;
    for(ll i=0; i<m; i++)
    {
        cin>>v>>u;
        if(v!=1&&u!=1)
        {
            u-=2;
            v-=2;
            ger[u].pb(v);
            ger[v].pb(u);
        }
        else
        {
            if(v==1)ger1.pb((u-2));
            else ger1.pb((v-2));
        }
    }
    if(n-ger1.an<k)
    {
        cout<<"     impossible";
        return 0;
    }
    for(ll i=0; i<n; i++)
    {
        sort(ger[i].begin(),ger[i].end());
    }
    vector<ll> root;
    for(ll i=0; i<n; i++)
    {
        if(moa[i]==-1)
        {
            okeyed(i);
            root.pb(i);
        }
    }

    if(root.size()>k)
    {
        cout<< "impossible";
        return 0;
    }
    for(ll i=0; i<n; i++)
    {
        gg[moa[i]]++;
    }
    for(ll i=0; i<ger1.an; i++)
    {
        v=ger1[i];
        gg[moa[v]]--;
    }
    for(ll i=0; i<root.an; i++)
    {
        v=root[i];
        if(gg[v]<=0)
        {
            cout<< "                      impossible";
            return 0;
        }
    }
    cout<<"possible";

}


// In the name of God

#include <bits/stdc++.h>

#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define an size()

using namespace std;
const ll maxn=3e5+500;
vector<ll> ger[maxn];
ll moa[maxn];
ll gg[maxn];
ll n;
void okeyed (ll a)
{
    ll savea=a;
    vector<ll> ham;
    vector<ll> ham2;
    vector<ll> tofale;
    for(ll i=0; i<ger[a].an; i++)
    {
        ham.pb(ger[a][i]);
    }
    ham.pb(maxn*50);
    tofale.pb(a);

    ll j=0,v,u=0;
    while(tofale.size()||j<n)
    {
        if(tofale.empty())
        {
            while(u<ham.size()&&j<n)
            {
                if(ham[u]==j)
                {
                    u++;
                    j++;
                }
                else if(ham[u]>j)
                {
                    if(moa[j]==-1)
                    {
                        tofale.pb(j);
                        break;
                    }
                    j++;
                }
                else if(ham[u]<j)
                {
                    u++;
                }
            }
        }
        else
        {
            ll ppu=ham[u];
            ham.pop_back();
            u=-1;
            v=tofale.back();
            tofale.pop_back();
            moa[v]=savea;
            ll p1=0;
            ll p2=0;
            while(p1<ham.size()&&p2<ger[v].size())
            {
                if(ham[p1]==ger[v][p2])
                {
                    if(ger[v][p2]>=ppu)
                    {
                        u=ham2.size();
                        ppu=maxn*50;
                    }
                    ham2.pb(ger[v][p2]);
                    p1++;
                    p2++;
                }
                else if(ham[p1]<ger[v][p2])
                {
                    tofale.pb(ham[p1]);
                    p1++;
                }
                else
                {
                    p2++;
                }
            }
            while(p1<ham.size())
            {
                tofale.pb(ham[p1]);
                p1++;
            }
            if(u==-1)
            {
                u=ham2.size();
            }
            ham.clear();
            swap(ham,ham2);
            ham.pb(maxn*50);
        }
    }
}
vector<ll> ans[maxn];
vector<ll> ger1;
int main()
{
    ios_base::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);
    ll m,k,v,u;
    for(ll j=0; j<maxn; j++)
    {
        moa[j]=-1;
    }
    cin>>n>>m>>k;
    n--;
    for(ll i=0; i<m; i++)
    {
        cin>>v>>u;
        if(v!=1&&u!=1)
        {
            u-=2;
            v-=2;
            ger[u].pb(v);
            ger[v].pb(u);
        }
        else
        {
            if(v==1)ger1.pb((u-2));
            else ger1.pb((u-2));
        }
    }
    n++;
    if(n-1-ger1.an<k)
    {
          cout<<"impossible";
          return 0;
    }

    for(ll i=0; i<n; i++)
    {
        sort(ger[i].begin(),ger[i].end());
    }
    for(ll i=0; i<n; i++)
    {
        if(moa[i]==-1)
        {
            okeyed(i);
        }
    }
    vector<ll> root;
    for(ll i=0; i<n; i++)
    {
        if(moa[i]==i)
        {
            root.pb(i);
        }
    }
    if(root.size()>k)
    {
        cout<< "impossible";
        return 0;
    }
    for(ll i=1; i<n; i++)
    {
        gg[moa[i]]++;
    }
    for(ll i=0; i<ger1.an; i++)
    {
        v=ger1[i];
        gg[moa[v]]--;
    }
    for(ll i=0; i<root.an; i++)
    {
        v=root[i];
        if(gg[v]<0)
        {
            cout<< "impossible";
            return 0;
        }
    }
    cout<<"possible";

}


// In the name of God

#include <bits/stdc++.h>

#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define an size()

using namespace std;
const ll maxn=3e5+500;
vector<ll> ger[maxn];
ll moa[maxn];
ll gg[maxn];
ll n;
void okeyed (ll a)
{
    ll savea=a;
    vector<ll> ham;
    vector<ll> ham2;
    vector<ll> tofale;
    for(ll i=0; i<ger[a].an; i++)
    {
        ham.pb(ger[a][i]);
    }
    ham.pb(maxn*50);
    tofale.pb(a);

    ll j=0,v,u=0;
    while(tofale.size()||j<n)
    {
        if(tofale.empty())
        {
            while(u<ham.size()&&j<n)
            {
                if(ham[u]==j)
                {
                    u++;
                    j++;
                }
                else if(ham[u]>j)
                {
                    if(moa[j]==-1)
                    {
                        tofale.pb(j);
                        break;
                    }
                    j++;
                }
                else if(ham[u]<j)
                {
                    u++;
                }
            }
        }
        else
        {
            ll ppu=ham[u];
            ham.pop_back();
            u=-1;
            v=tofale.back();
            tofale.pop_back();
            moa[v]=savea;
            ll p1=0;
            ll p2=0;
            while(p1<ham.size()&&p2<ger[v].size())
            {
                if(ham[p1]==ger[v][p2])
                {
                    if(ger[v][p2]>=ppu)
                    {
                        u=ham2.size();
                        ppu=maxn*50;
                    }
                    ham2.pb(ger[v][p2]);
                    p1++;
                    p2++;
                }
                else if(ham[p1]<ger[v][p2])
                {
                    tofale.pb(ham[p1]);
                    p1++;
                }
                else
                {
                    p2++;
                }
            }
            while(p1<ham.size())
            {
                tofale.pb(ham[p1]);
                p1++;
            }
            if(u==-1)
            {
                u=ham2.size();
            }
            ham.clear();
            swap(ham,ham2);
            ham.pb(maxn*50);
        }
    }
}
vector<ll> ans[maxn];
vector<ll> ger1;
int main()
{
    ios_base::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);
    ll m,k,v,u;
    for(ll j=0; j<maxn; j++)
    {
        moa[j]=-1;
    }
    cin>>n>>m>>k;
    n--;
    for(ll i=0; i<m; i++)
    {
        cin>>v>>u;
        if(v!=1&&u!=1)
        {
            u-=2;
            v-=2;
            ger[u].pb(v);
            ger[v].pb(u);
        }
        else
        {
            if(v==1)ger1.pb((u-2));
            else ger1.pb((u-2));
        }
    }
    for(ll i=0; i<n; i++)
    {
        sort(ger[i].begin(),ger[i].end());
    }
    for(ll i=0; i<n; i++)
    {
        if(moa[i]==-1)
        {
            okeyed(i);
        }
    }
    vector<ll> root;
    for(ll i=0; i<n; i++)
    {
        if(moa[i]==i)
        {
            root.pb(i);
        }
    }
    if(root.size()>k)
    {
        cout<< "impossible";
        return 0;
    }
    for(ll i=1; i<n; i++)
    {
        gg[moa[i]]++;
    }
    for(ll i=0; i<ger1.an; i++)
    {
        v=ger1[i];
        gg[moa[v]]--;
    }
    for(ll i=0; i<root.an; i++)
    {
        v=root[i];
        if(gg[v]<0)
        {
            cout<< "impossible";
            return 0;
        }
    }
    cout<<"possible";

}


#include <bits/stdc++.h>
using namespace std;
#define fl(i,a,b) for(int i=a;i<b;i++)
#define ll long long
#define endl '\n'
#define pb push_back
#define ff first
#define ff first
#define ss second
#define mod 998244353
#define inf 4e18
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define mx 300005
vector<int> v[mx];
int cnt;

bool vis[mx];
set<int>s;
void dfs(int x)
{
	vis[x] = 1;
	cnt++;
	vector<int> temp;
	int y = 1;
	y = *s.lower_bound(y);
	for(auto i : v[x])
	{
		while(y < i)
		{
			s.erase(y);
			temp.pb(y);
			y = *s.lower_bound(y);
		}
		y = *s.lower_bound(i+1);
	}

	for(auto i : temp)
	{
		dfs(i);
	}
}
main()
{
	fast;
	int n , m, K ;
	cin >> n >> m >> K;
	int cntR = 0;
	fl(i,0,m)
	{
		int x,y;
		cin >> x >> y;
		v[x].pb(y);
		v[y].pb(x);
		cntR += (x == 1) | (y == 1);
	}

	fl(i,1,n+1)
	{
		s.insert(i);
		sort(v[i].begin(), v[i].end());
		v[i].pb(n+1);
	}
	s.insert(n+1);
	vector<int> ans;
	fl(i,1,n+1)
	{
		if(!vis[i])
		{
			s.erase(i);
			cnt  = 0;
			dfs(i);
			ans.pb(cnt);

		}
	}
	if(ans.size() == 1 && n - 1 - cntR >= K)
	{
		cout << "possible";
	}
	else cout << "impossible";

}


#include <bits/stdc++.h>
using namespace std;
#define fl(i,a,b) for(int i=a;i<b;i++)
#define ll long long
#define endl '\n'
#define pb push_back
#define ff first
#define ff first
#define ss second
#define mod 998244353
#define inf 4e18
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define mx 300005
vector<int> v[mx];
int cnt;

bool vis[mx];
set<int>s;
void dfs(int x)
{
	vis[x] = 1;
	cnt++;
	vector<int> temp;
	int y = 1;
	y = *s.lower_bound(y);
	for(auto i : v[x])
	{
		if(i == 1)
			continue;
		while(y < i)
		{
			s.erase(y);
			temp.pb(y);
			y = *s.lower_bound(y);
		}
		y = *s.lower_bound(i+1);
	}

	for(auto i : temp)
	{
		dfs(i);
	}
}
main()
{
	fast;
	int n , m, K ;
	cin >> n >> m >> K;
	int cntR = 0;
	fl(i,0,m)
	{
		int x,y;
		cin >> x >> y;
		v[x].pb(y);
		v[y].pb(x);
		cntR += (x == 1) | (y == 1);
	}

	fl(i,2,n+1)
	{
		s.insert(i);
		sort(v[i].begin(), v[i].end());
		v[i].pb(n+1);
	}
	s.insert(n+1);
	vector<int> ans;
	fl(i,2,n+1)
	{
		if(!vis[i])
		{
			s.erase(i);
			cnt  = 0;
			dfs(i);
			ans.pb(cnt);

		}
	}
	if(ans.size() == 1 && n - 1 - cntR >= K)
	{
		cout << "possible";
	}
	else cout << "impossible";

}


#include <bits/stdc++.h>
using namespace std;
#define fl(i,a,b) for(int i=a;i<b;i++)
#define ll long long
#define endl '\n'
#define pb push_back
#define ff first
#define ff first
#define ss second
#define mod 998244353
#define inf 4e18
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define mx 300005
vector<int> v[mx];
set<int> mp[2];
int cnt;
bool vis[mx];
set<int>s;
bool ok;
void dfs(int x)
{
	vis[x] = 1;
	cnt++;
	ok |= (mp[1].find(x) == mp[1].end());
	vector<int> temp;
	int y = 1;
	y = *s.lower_bound(y);
	for(auto i : v[x])
	{
		if(i == 1)
			continue;
		while(y < i)
		{
			s.erase(y);
			temp.pb(y);
			y = *s.lower_bound(y);
		}
		y = *s.lower_bound(i+1);
	}

	for(auto i : temp)
	{
		dfs(i);
	}
}
main()
{
	fast;
	int n , m, K ;
	cin >> n >> m >> K;
	int cntR = 0;
	fl(i,0,m)
	{
		int x,y;
		cin >> x >> y;
		v[x].pb(y);
		v[y].pb(x);
		if(x == 1)
			mp[x].insert(y);
		else if(y == 1)
			mp[y].insert(x);
		cntR += (x == 1) | (y == 1);
	}

	fl(i,2,n+1)
	{
		s.insert(i);
		sort(v[i].begin(), v[i].end());
		v[i].pb(n+1);
	}
	s.insert(n+1);
	vector<int> ans;

	fl(i,2,n+1)
	{
		if(!vis[i])
		{
			ok = 0;
			s.erase(i);
			cnt  = 0;
			dfs(i);
			ans.pb(cnt);
		}
	}
	if(n - 1 - cntR >= K && ok && ans.size() <= K)
	{
		cout << "possible";
	}
	else cout << "impossible";

}


#include <bits/stdc++.h>
using namespace std;
#define fl(i,a,b) for(int i=a;i<b;i++)
#define ll long long
#define endl '\n'
#define pb push_back
#define ff first
#define ff first
#define ss second
#define mod 998244353
#define inf 4e18
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define mx 300005
vector<int> v[mx];
set<int> mp[2];
int cnt;
bool vis[mx];
set<int>s;
bool ok;
void dfs(int x)
{
	vis[x] = 1;
	cnt++;
	ok |= (mp[1].find(x) == mp[1].end());
	vector<int> temp;
	int y = 1;
	y = *s.lower_bound(y);
	for(auto i : v[x])
	{
		if(i == 1)
			continue;
		while(y < i)
		{
			s.erase(y);
			temp.pb(y);
			y = *s.lower_bound(y);
		}
		y = *s.lower_bound(i+1);
	}

	for(auto i : temp)
	{
		dfs(i);
	}
}
main()
{
	fast;
	int n , m, K ;
	cin >> n >> m >> K;
	int cntR = 0;
	fl(i,0,m)
	{
		int x,y;
		cin >> x >> y;
		v[x].pb(y);
		v[y].pb(x);
		if(x == 1)
			mp[x].insert(y);
		else if(y == 1)
			mp[y].insert(x);
	}
	cntR = v[1].size();
	fl(i,2,n+1)
	{
		s.insert(i);
		sort(v[i].begin(), v[i].end());
		v[i].pb(n+1);
	}
	s.insert(n+1);
	vector<int> ans;
	bool okF = 1;
	fl(i,2,n+1)
	{
		if(!vis[i])
		{
			ok = 0;
			s.erase(i);
			cnt  = 0;
			dfs(i);
			ans.pb(cnt);
			okF &= ok;
		}
	}
	if(n - 1 - cntR >= K && okF && ans.size() <= K)
	{
		cout << "possible";
	}
	else cout << "impossible";

}


#include<bits/stdc++.h>
#define ll          long long int
#define pb          push_back
#define vi          vector<ll>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define hell        1000000007
#define lbnd        lower_bound
#define ubnd        upper_bound
#define sll      set<ll>
#define msll    multiset<ll>
#define io  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;

ll no=0,one=0;

int main()
{
  io
  ll i,j,n,m,k;
  cin>>n>>m>>k;
  for(i=0;i<m;i++){
    ll u,v;
    cin>>u>>v;
    if(u==1 || v==1){
      one++;
    }
    else no++;
  }
  if(n==2){
    if(k==1){
      if(!m) cout<<"possible";
      else cout<<"impossible";
      return 0;
    }
    else{
      cout<<"possible";
      return 0;
    }
  }
  if(n-1-one>=k and k+(((n-1)*(n-2))/2)-no>=n-1) cout<<"possible";
  else cout<<"impossible";

  return 0;
}


#include<bits/stdc++.h>
#define ll          long long int
#define pb          push_back
#define vi          vector<ll>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define hell        1000000007
#define lbnd        lower_bound
#define ubnd        upper_bound
#define sll      set<ll>
#define msll    multiset<ll>
#define io  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;

ll n,m,k;
vi a[300005];
ll oneki[300004],hai[300004],ans[300004];
sll unvis;
ll components;

void dfs(ll node){
  unvis.erase(node);
  ans[node]=components;
  ll cur=0;
  while(1){
    auto it=unvis.upper_bound(cur);
    if(it==unvis.end()) break;
    ll agli=(*it);
    if(!binary_search(all(a[node]),agli)) dfs(agli);
    cur=agli;
  }
}

int main()
{
  io
  ll i,j;
  cin>>n>>m>>k;
  for(i=0;i<m;i++){
    ll u,v;
    cin>>u>>v;
    if(u==1 || v==1){
      oneki[max(u,v)]=1;
    }
    else{
      a[u].pb(v);
      a[v].pb(u);
    }

  }
  for(i=2;i<=n;i++){
    unvis.insert(i);
    sort(all(a[i]));
  }
  components=0;
  for(i=2;i<=n;i++){
    if(unvis.count(i)){
      components++;
      dfs(i);
    }
  }
  if(components>k){
    cout<<"impossible";
    return 0;
  }
  memset(hai,0,sizeof hai);
  for(i=2;i<=n;i++){
    if(!oneki[i]){
      hai[ans[i]]=1;
    }
  }
  for(i=1;i<=components;i++){
    if(!hai[i]){
      cout<<"impossible";
      return 0;
    }
  }
  cout<<"possible";

  return 0;
}


#include<bits/stdc++.h>
#define ll          long long int
#define pb          push_back
#define vi          vector<ll>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define hell        1000000007
#define lbnd        lower_bound
#define ubnd        upper_bound
#define sll      set<ll>
#define msll    multiset<ll>
#define io  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;

ll no=0,one=0;

int main()
{
  io
  ll i,j,n,m,k;
  cin>>n>>m>>k;
  for(i=0;i<m;i++){
    ll u,v;
    cin>>u>>v;
    if(u==1 || v==1){
      one++;
    }
    else no++;
  }
  if(n==2){

  }
  if(n-1-one>=k and k+(((n-1)*(n-2))/2)-no>=n-1) cout<<"possible";
  else cout<<"impossible";

  return 0;
}


#include<bits/stdc++.h>
#define ll          long long int
#define pb          push_back
#define vi          vector<ll>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define hell        1000000007
#define lbnd        lower_bound
#define ubnd        upper_bound
#define sll      set<ll>
#define msll    multiset<ll>
#define io  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;

ll n,m,k,one=0;
vi a[300005];
ll oneki[300004],hai[300004],ans[300004];
sll unvis;
ll components;

void dfs(ll node){
  unvis.erase(node);
  ans[node]=components;
  ll cur=0;
  while(1){
    auto it=unvis.upper_bound(cur);
    if(it==unvis.end()) break;
    ll agli=(*it);
    if(!binary_search(all(a[node]),agli)) dfs(agli);
    cur=agli;
  }
}

int main()
{
  io
  ll i,j;
  cin>>n>>m>>k;
  for(i=0;i<m;i++){
    ll u,v;
    cin>>u>>v;
    if(u==1 || v==1){
      oneki[max(u,v)]=1;
      one++;
    }
    else{
      a[u].pb(v);
      a[v].pb(u);
    }

  }
  for(i=2;i<=n;i++){
    unvis.insert(i);
    sort(all(a[i]));
  }
  components=0;
  for(i=2;i<=n;i++){
    if(unvis.count(i)){
      components++;
      dfs(i);
    }
  }
  if(components>k){
    cout<<"impossible";
    return 0;
  }
  memset(hai,0,sizeof hai);
  for(i=2;i<=n;i++){
    if(!oneki[i]){
      hai[ans[i]]=1;
    }
  }
  for(i=1;i<=components;i++){
    if(!hai[i]){
      cout<<"impossible";
      return 0;
    }
  }
  if(n-1-one<k) cout<<"impossible";
  else cout<<"possible";

  return 0;
}


/*
ID: kfoozminus
TASK:
LANG: C++
*/

#include <bits/stdc++.h>
using namespace std;
//typedefs
/*
typedef long long ll;
typedef unsigned long long ull;
typedef pair <int, int> pii;
typedef pair <int, pii> piii;
typedef vector <int> vi;
typedef vector <ll> vl;
typedef pair <ll, ll> pll;
const double PI = acos(-1);
*/
//typedefs
#define ll long long
#define ull unsigned long long
#define pii pair <int, int>
#define piii pair <int, pii>
#define vi vector <int>
#define vl vector <ll>
#define pll pair <ll, ll>
#define PI acos(-1)
//defines
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define mem(a, b) memset(a, b, sizeof(a))
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*(b/gcd(a,b)))
#define SQR(a) ((a)*(a))
#define inf 100000000
#define mod 1000000007
#define mod1 1000000007
#define mod2 1000000009
#define b1 43
#define b2 41
#define EPS 1e-9
//define harmonic(n) 0.57721566490153286l+log(n)
#define nl puts("")
#define odd(n) ((n)&1)
#define even(n) (!((n)&1))
#define vsort(v) sort(v.begin(), v.end())
#define lc (node<<1)
#define rc ((node<<1)|1)
#define ran(a, b) ((((rand() << 15) ^ rand()) % ((b) - (a) + 1)) + (a))
//loop
#define rep(i, n) for(int i = 0; i < n; ++i)
#define REP(i, n) for(int i = 1; i <= n; ++i)
//input
#define si(a) scanf("%d", &a)
#define sii(a, b) scanf("%d%d", &a, &b)
#define siii(a, b, c) scanf("%d%d%d", &a, &b, &c)
#define sl(a) scanf("%lld", &a)
#define sll(a, b) scanf("%lld%lld", &a, &b)
#define slll(a, b, c) scanf("%lld%lld%lld", &a, &b, &c)
#define sd(a) scanf("%lf", &a)
#define sc(a) scanf("%c", &a)
#define sst(a) scanf("%s", a)
inline bool EQ(double a, double b) { return fabs(a-b) < 1e-9; }
//debug
#ifdef kfoozminus

template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
	return os << "(" << p.first << ", " << p.second << ")";
}

template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
	os << "{";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
		os << *it;
	}
    return os << "}";
}

template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
	os << "[";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin()) os << ", ";
		os << *it;
	}
    return os << "]";
}

template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
	os << "[";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
		os << it -> first << " = " << it -> second ;
	}
    return os << "]";
}

#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

clock_t tStart = clock();
#define timeStamp dbg("Execution Time: ", (double)(clock() - tStart)/CLOCKS_PER_SEC)

void faltu () { cerr << endl; }

template <typename T>
void faltu( T a[], int n ) {
	for(int i = 0; i < n; ++i) cerr << a[i] << ' ';
	cerr << endl;
}

template <typename T, typename ... hello>
void faltu( T arg, const hello &... rest) { cerr << arg << ' '; faltu(rest...); }

#else
#define dbg(args...)
#endif
/*
ll add(ll a, ll b) {
	ll ret = a+b;
	if(ret >= mod) ret -= mod;
	return ret;
}

ll subtract(ll a, ll b) {
	ll ret = a-b;
	if(ret < 0) ret += mod;
	return ret;
}

ll mult(ll a, ll b) {
	ll ret = a*b;
	if(ret >= mod) ret %= mod;
	return ret;
}

ll bigmod(ll a, ll b) {
	ll ret = 1;
	while(b) {
		if(b&1) ret = mult(ret, a);
		b >>= 1; a = mult(a, a);
	}
	return ret;
}
*/

//ll inverse(ll n) { return bigmod(n, mod-2); }

/*
#define PMX 1000000

int marked[PMX/64 + 2];
vi primes;

#define mark(x) marked[x >> 6] |= (1 << ((x & 63) >> 1))
#define check(x) (marked[x >> 6] & (1 << ((x & 63) >> 1)))

bool isPrime(int x)
{
	return (x > 1) && ((x == 2) || ((x & 1) && (!(check(x)))));
}

void seive(int n)
{
	int i, j;
	for(i = 3; i * i <= n; i += 2) if(!check(i)) for(j = i * i; j <= n; j += i << 1) mark(j);
	primes.PB(2);
	for(i = 3; i <= n; i += 2) if(isPrime(i)) primes.PB(i);
}
*/

//Direction Array
//int fx[]={1, -1, 0, 0}; int fy[]={0, 0, 1, -1};
//int fx[]={0, 0, 1, -1, -1, 1, -1, 1}; int fy[]={-1, 1, 0, 0, 1, 1, -1, -1};

//bit manipulation
/*
bool checkBit(int n, int i) { return (n&(1<<i)); }
int setBit(int n, int i) { return (n|(1<<i)); }
int resetBit(int n, int i) { return (n&(~(1<<i))); }
*/
//end of template

#define MX 300007

int n, m, u, v, k, _k, pre, c, i, j;
vector<int> edge[MX];
queue<int> q;
set<int> vis;

int main () {
#ifdef kfoozminus
//	freopen("in", "r", stdin);
//	freopen("out", "w", stdout);
#endif

	scanf("%d %d %d", &n, &m, &k);
	while(m --) {
		scanf("%d %d", &u, &v);
		edge[u].PB(v);
		edge[v].PB(u);
	}
	for(i = 1; i <= n; i ++) {
		edge[i].PB(n + 1);
		if(i > 1) vis.insert(i);
		vsort(edge[i]);
	}

	pre = 1;
	for(i = 0; i < edge[1].size(); i ++) {
		dbg(i, edge[1][i]);
		for(c = pre + 1; c < edge[1][i]; c ++) {
			q.push(c);
			vis.erase(c);
			dbg(c);
			_k ++;
			if(_k == k) break;
		}
		if(c < edge[1][i]) break;
		pre = edge[1][i];
	}
	if(_k < k) {
		printf("impossible\n");
		return 0;
	}

	while(q.empty() == 0) {
		i = q.front();
		q.pop();
		pre = 0;
		for(j = 0; j < edge[i].size(); j ++) {
			while(true) {
				auto it = vis.upper_bound(pre);
				if(it == vis.end()) break;
				if(*it >= edge[i][j]) break;
				vis.erase(*it);
				pre = *it;
				q.push(*it);
				dbg(*it);
			}
			//dbg(i, edge[i][j]);
			/*for(c = pre + 1; c < edge[i][j]; c ++) {
				if(vis[c]) continue;
				dbg(i, c);
				q.push(c);
				vis[c] = 1;
			}*/
			pre = edge[i][j];
		}
	}
	if(vis.size()) {
		printf("impossible\n");
		return 0;
	}
	printf("possible\n");

//	timeStamp;
	return 0;
}


/*
ID: kfoozminus
TASK:
LANG: C++
*/

#include <bits/stdc++.h>
using namespace std;
//typedefs
/*
typedef long long ll;
typedef unsigned long long ull;
typedef pair <int, int> pii;
typedef pair <int, pii> piii;
typedef vector <int> vi;
typedef vector <ll> vl;
typedef pair <ll, ll> pll;
const double PI = acos(-1);
*/
//typedefs
#define ll long long
#define ull unsigned long long
#define pii pair <int, int>
#define piii pair <int, pii>
#define vi vector <int>
#define vl vector <ll>
#define pll pair <ll, ll>
#define PI acos(-1)
//defines
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define mem(a, b) memset(a, b, sizeof(a))
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*(b/gcd(a,b)))
#define SQR(a) ((a)*(a))
#define inf 100000000
#define mod 1000000007
#define mod1 1000000007
#define mod2 1000000009
#define b1 43
#define b2 41
#define EPS 1e-9
//define harmonic(n) 0.57721566490153286l+log(n)
#define nl puts("")
#define odd(n) ((n)&1)
#define even(n) (!((n)&1))
#define vsort(v) sort(v.begin(), v.end())
#define lc (node<<1)
#define rc ((node<<1)|1)
#define ran(a, b) ((((rand() << 15) ^ rand()) % ((b) - (a) + 1)) + (a))
//loop
#define rep(i, n) for(int i = 0; i < n; ++i)
#define REP(i, n) for(int i = 1; i <= n; ++i)
//input
#define si(a) scanf("%d", &a)
#define sii(a, b) scanf("%d%d", &a, &b)
#define siii(a, b, c) scanf("%d%d%d", &a, &b, &c)
#define sl(a) scanf("%lld", &a)
#define sll(a, b) scanf("%lld%lld", &a, &b)
#define slll(a, b, c) scanf("%lld%lld%lld", &a, &b, &c)
#define sd(a) scanf("%lf", &a)
#define sc(a) scanf("%c", &a)
#define sst(a) scanf("%s", a)
inline bool EQ(double a, double b) { return fabs(a-b) < 1e-9; }
//debug
#ifdef kfoozminus

template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
	return os << "(" << p.first << ", " << p.second << ")";
}

template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
	os << "{";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
		os << *it;
	}
    return os << "}";
}

template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
	os << "[";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin()) os << ", ";
		os << *it;
	}
    return os << "]";
}

template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
	os << "[";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
		os << it -> first << " = " << it -> second ;
	}
    return os << "]";
}

#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

clock_t tStart = clock();
#define timeStamp dbg("Execution Time: ", (double)(clock() - tStart)/CLOCKS_PER_SEC)

void faltu () { cerr << endl; }

template <typename T>
void faltu( T a[], int n ) {
	for(int i = 0; i < n; ++i) cerr << a[i] << ' ';
	cerr << endl;
}

template <typename T, typename ... hello>
void faltu( T arg, const hello &... rest) { cerr << arg << ' '; faltu(rest...); }

#else
#define dbg(args...)
#endif
/*
ll add(ll a, ll b) {
	ll ret = a+b;
	if(ret >= mod) ret -= mod;
	return ret;
}

ll subtract(ll a, ll b) {
	ll ret = a-b;
	if(ret < 0) ret += mod;
	return ret;
}

ll mult(ll a, ll b) {
	ll ret = a*b;
	if(ret >= mod) ret %= mod;
	return ret;
}

ll bigmod(ll a, ll b) {
	ll ret = 1;
	while(b) {
		if(b&1) ret = mult(ret, a);
		b >>= 1; a = mult(a, a);
	}
	return ret;
}
*/

//ll inverse(ll n) { return bigmod(n, mod-2); }

/*
#define PMX 1000000

int marked[PMX/64 + 2];
vi primes;

#define mark(x) marked[x >> 6] |= (1 << ((x & 63) >> 1))
#define check(x) (marked[x >> 6] & (1 << ((x & 63) >> 1)))

bool isPrime(int x)
{
	return (x > 1) && ((x == 2) || ((x & 1) && (!(check(x)))));
}

void seive(int n)
{
	int i, j;
	for(i = 3; i * i <= n; i += 2) if(!check(i)) for(j = i * i; j <= n; j += i << 1) mark(j);
	primes.PB(2);
	for(i = 3; i <= n; i += 2) if(isPrime(i)) primes.PB(i);
}
*/

//Direction Array
//int fx[]={1, -1, 0, 0}; int fy[]={0, 0, 1, -1};
//int fx[]={0, 0, 1, -1, -1, 1, -1, 1}; int fy[]={-1, 1, 0, 0, 1, 1, -1, -1};

//bit manipulation
/*
bool checkBit(int n, int i) { return (n&(1<<i)); }
int setBit(int n, int i) { return (n|(1<<i)); }
int resetBit(int n, int i) { return (n&(~(1<<i))); }
*/
//end of template

#define MX 300007

int n, m, u, v, k, _k, pre, c, i, j, prec;
vector<int> edge[MX];
queue<int> q;
set<int> vis, one;

int main () {
#ifdef kfoozminus
//	freopen("in", "r", stdin);
//	freopen("out", "w", stdout);
#endif

	scanf("%d %d %d", &n, &m, &k);
	while(m --) {
		scanf("%d %d", &u, &v);
		edge[u].PB(v);
		edge[v].PB(u);
	}
	for(i = 1; i <= n; i ++) {
		edge[i].PB(n + 1);
		if(i > 1) vis.insert(i);
		vsort(edge[i]);
	}
	j = 0;
	for(i = 2; i <= n; i ++) {
		if(edge[1][j] == i) {
			j ++;
			continue;
		}
		if(edge[i].size() == n - 1) {
			vis.erase(i);
			q.push(i);
			_k ++;
		}
	}
	if(_k > k) {
		printf("impossible\n");
		return 0;
	}
	j = 0;
	for(i = 2; i <= n; i ++) {
		if(_k == k) break;
		if(edge[1][j] == i) {
			j ++;
			continue;
		}
		if(edge[i].size() != n - 1) {
			vis.erase(i);
			q.push(i);
			_k ++;
		}
	}

	dbg(_k);

	/*pre = 1;
	for(i = 0; i < edge[1].size(); i ++) {
		dbg(i, edge[1][i]);
		for(c = pre + 1; c < edge[1][i]; c ++) {
			q.push(c);
			vis.erase(c);
			one.insert(c);
			dbg(c);
			_k ++;
			//if(_k == k) break;
		}
		//if(c < edge[1][i]) break;
		pre = edge[1][i];
	}
	if(_k < k) {
		printf("impossible\n");
		return 0;
	}*/

	int cnt = 0;

	while(q.empty() == 0) {
		i = q.front();
		q.pop();
		pre = 0;
		prec = 0;
		for(j = 0; j < edge[i].size(); j ++) {
			while(true) {
				auto it = vis.upper_bound(pre);
				if(it == vis.end()) break;
				if(*it >= edge[i][j]) break;
				/*while(true) {
					auto it1 = one.upper_bound(pre);
					if(it1 == one.end()) break;
					if(*it1 >= *it) break;
					cnt ++;
					pre = *it1;
					one.erase(*it1);
				}*/
				pre = *it;
				q.push(*it);
				vis.erase(*it);
				dbg(*it);
			}
			//dbg(i, edge[i][j]);
			/*for(c = pre + 1; c < edge[i][j]; c ++) {
				if(vis[c]) continue;
				dbg(i, c);
				q.push(c);
				vis[c] = 1;
			}*/
			pre = edge[i][j];
		}
	}
	/*int al = n - 1 - edge[1].size() + 1;
	if(vis.size() || (al - cnt > k)) {*/
	if(vis.size()) {
		dbg(vis.size());
		printf("impossible\n");
		return 0;
	}
	printf("possible\n");

//	timeStamp;
	return 0;
}


/*
ID: kfoozminus
TASK:
LANG: C++
*/

#include <bits/stdc++.h>
using namespace std;
//typedefs
/*
typedef long long ll;
typedef unsigned long long ull;
typedef pair <int, int> pii;
typedef pair <int, pii> piii;
typedef vector <int> vi;
typedef vector <ll> vl;
typedef pair <ll, ll> pll;
const double PI = acos(-1);
*/
//typedefs
#define ll long long
#define ull unsigned long long
#define pii pair <int, int>
#define piii pair <int, pii>
#define vi vector <int>
#define vl vector <ll>
#define pll pair <ll, ll>
#define PI acos(-1)
//defines
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define mem(a, b) memset(a, b, sizeof(a))
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*(b/gcd(a,b)))
#define SQR(a) ((a)*(a))
#define inf 100000000
#define mod 1000000007
#define mod1 1000000007
#define mod2 1000000009
#define b1 43
#define b2 41
#define EPS 1e-9
//define harmonic(n) 0.57721566490153286l+log(n)
#define nl puts("")
#define odd(n) ((n)&1)
#define even(n) (!((n)&1))
#define vsort(v) sort(v.begin(), v.end())
#define lc (node<<1)
#define rc ((node<<1)|1)
#define ran(a, b) ((((rand() << 15) ^ rand()) % ((b) - (a) + 1)) + (a))
//loop
#define rep(i, n) for(int i = 0; i < n; ++i)
#define REP(i, n) for(int i = 1; i <= n; ++i)
//input
#define si(a) scanf("%d", &a)
#define sii(a, b) scanf("%d%d", &a, &b)
#define siii(a, b, c) scanf("%d%d%d", &a, &b, &c)
#define sl(a) scanf("%lld", &a)
#define sll(a, b) scanf("%lld%lld", &a, &b)
#define slll(a, b, c) scanf("%lld%lld%lld", &a, &b, &c)
#define sd(a) scanf("%lf", &a)
#define sc(a) scanf("%c", &a)
#define sst(a) scanf("%s", a)
inline bool EQ(double a, double b) { return fabs(a-b) < 1e-9; }
//debug
#ifdef kfoozminus

template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
	return os << "(" << p.first << ", " << p.second << ")";
}

template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
	os << "{";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
		os << *it;
	}
    return os << "}";
}

template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
	os << "[";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin()) os << ", ";
		os << *it;
	}
    return os << "]";
}

template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
	os << "[";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
		os << it -> first << " = " << it -> second ;
	}
    return os << "]";
}

#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

clock_t tStart = clock();
#define timeStamp dbg("Execution Time: ", (double)(clock() - tStart)/CLOCKS_PER_SEC)

void faltu () { cerr << endl; }

template <typename T>
void faltu( T a[], int n ) {
	for(int i = 0; i < n; ++i) cerr << a[i] << ' ';
	cerr << endl;
}

template <typename T, typename ... hello>
void faltu( T arg, const hello &... rest) { cerr << arg << ' '; faltu(rest...); }

#else
#define dbg(args...)
#endif
/*
ll add(ll a, ll b) {
	ll ret = a+b;
	if(ret >= mod) ret -= mod;
	return ret;
}

ll subtract(ll a, ll b) {
	ll ret = a-b;
	if(ret < 0) ret += mod;
	return ret;
}

ll mult(ll a, ll b) {
	ll ret = a*b;
	if(ret >= mod) ret %= mod;
	return ret;
}

ll bigmod(ll a, ll b) {
	ll ret = 1;
	while(b) {
		if(b&1) ret = mult(ret, a);
		b >>= 1; a = mult(a, a);
	}
	return ret;
}
*/

//ll inverse(ll n) { return bigmod(n, mod-2); }

/*
#define PMX 1000000

int marked[PMX/64 + 2];
vi primes;

#define mark(x) marked[x >> 6] |= (1 << ((x & 63) >> 1))
#define check(x) (marked[x >> 6] & (1 << ((x & 63) >> 1)))

bool isPrime(int x)
{
	return (x > 1) && ((x == 2) || ((x & 1) && (!(check(x)))));
}

void seive(int n)
{
	int i, j;
	for(i = 3; i * i <= n; i += 2) if(!check(i)) for(j = i * i; j <= n; j += i << 1) mark(j);
	primes.PB(2);
	for(i = 3; i <= n; i += 2) if(isPrime(i)) primes.PB(i);
}
*/

//Direction Array
//int fx[]={1, -1, 0, 0}; int fy[]={0, 0, 1, -1};
//int fx[]={0, 0, 1, -1, -1, 1, -1, 1}; int fy[]={-1, 1, 0, 0, 1, 1, -1, -1};

//bit manipulation
/*
bool checkBit(int n, int i) { return (n&(1<<i)); }
int setBit(int n, int i) { return (n|(1<<i)); }
int resetBit(int n, int i) { return (n&(~(1<<i))); }
*/
//end of template

#define MX 300007

int n, m, u, v, k, _k, pre, c, i, j, prec;
vector<int> edge[MX];
queue<int> q;
set<int> vis, one;

int main () {
#ifdef kfoozminus
//	freopen("in", "r", stdin);
//	freopen("out", "w", stdout);
#endif

	scanf("%d %d %d", &n, &m, &k);
	while(m --) {
		scanf("%d %d", &u, &v);
		edge[u].PB(v);
		edge[v].PB(u);
	}
	for(i = 1; i <= n; i ++) {
		edge[i].PB(n + 1);
		if(i > 1) vis.insert(i);
		vsort(edge[i]);
	}

	pre = 1;
	for(i = 0; i < edge[1].size(); i ++) {
		dbg(i, edge[1][i]);
		for(c = pre + 1; c < edge[1][i]; c ++) {
			q.push(c);
			vis.erase(c);
			one.insert(c);
			dbg(c);
			_k ++;
			//if(_k == k) break;
		}
		//if(c < edge[1][i]) break;
		pre = edge[1][i];
	}
	if(_k < k) {
		printf("impossible\n");
		return 0;
	}

	int cnt = 0;

	while(q.empty() == 0) {
		i = q.front();
		q.pop();
		pre = 0;
		prec = 0;
		for(j = 0; j < edge[i].size(); j ++) {
			while(true) {
				auto it = vis.upper_bound(pre);
				if(it == vis.end()) break;
				if(*it >= edge[i][j]) break;
				while(true) {
					auto it1 = one.upper_bound(pre);
					if(it1 == one.end()) break;
					if(*it1 >= *it) break;
					cnt ++;
					pre = *it1;
					one.erase(*it1);
				}
				pre = *it;
				q.push(*it);
				vis.erase(*it);
				dbg(*it);
			}
			//dbg(i, edge[i][j]);
			/*for(c = pre + 1; c < edge[i][j]; c ++) {
				if(vis[c]) continue;
				dbg(i, c);
				q.push(c);
				vis[c] = 1;
			}*/
			pre = edge[i][j];
		}
	}
	int al = n - 1 - edge[1].size() + 1;
	assert(al - cnt <= k);
	if(vis.size() || (al - cnt > k)) {
		printf("impossible\n");
		return 0;
	}
	printf("possible\n");

//	timeStamp;
	return 0;
}