#include<bits/stdc++.h>
using namespace std;
#define debug(x) cout<<#x<<':'<<x<<endl;
typedef long long ll;
int main(){
int n,k;
cin>>n>>k;
vector<vector<int>>G(k);
for(int i=0;i<n;i++){
int a,b;
cin>>a>>b;
a--;b--;
G[a].push_back(b);
G[b].push_back(a);
}
vector<bool>cr(k);//非叶子节点 true
for(int i=0;i<k;i++){
set<int>x(G[i].begin(),G[i].end());
cr[i]=x.size() > =1;
//debug(cr[i]);
}
vector<bool>visited(k);
int cycles=0;
int paths=0;
for(int i=0;i<k;i++){
if(visited[i]||!cr[i]) continue;
stack<int>S;
S.push(i);
visited[i]=true;
bool is_cycle=true;
while(!S.empty()){
int cur=S.top();S.pop();
set<int>cur_adj;
for(auto nxt: G[cur]){
if(cr[nxt]&&nxt!=cur){
cur_adj.insert(nxt);
}
}
if(cur_adj.size()>2){
cout<<"impossible"<<endl;
return 0;
}
if(cur_adj.size()<=1){
is_cycle=false;
}
for(auto nxt:cur_adj){
if(!visited[nxt]){
S.push(nxt);
visited[nxt]=true;
}
}
}
if(is_cycle) {
// debug(i);
cycles++;
}
else paths++;
}
if(cycles==1) {
for (int i = 0; i < k; i++) {
for (auto v: G[i]) {
if (!cr[i] && !cr[v]) {
cout << "impossible" << endl;
return 0;
}
}
}
if (paths == 0) {
cout << "possible" << endl;
return 0;
}
cout << "impossible" << endl;
return 0;
}
if(cycles>1){
cout<<"impossible"<<endl;
return 0;
}
cout<<"possible"<<endl;
return 0;
}