#include<bits/stdc++.h>
using namespace std;
int n,m;
int Path[10001][10001];
int path[10001][10001];
vector<int>vis;
int Min=9999999;
bool ok()
{
for(int i=1;i<=n;i++)
for(int j=1;j<=n;j++)
if(path[i][j]!=9999999&&i!=j)
return false;
return true;
}
bool Check(int x)
{
if(vis.empty())return true;
for(int i=0;i<=vis.size()-1;i++)
if(Path[vis[i]][x]==1)
return false;
return true;
}
void dfs(int x)
{
if(ok())
{
Min=min(Min,x-1);
return;
}
for(int i=1;i<=n;i++)
if(Check(i))
{
for(int j=1;j<=n;j++)
{
Path[i][j]=path[i][j];
Path[j][i]=path[j][i];
}
vis.push_back(i);
for(int j=1;j<=n;j++)
if(i!=j)
path[i][j]=path[j][i]=9999999;
dfs(x+1);
vis.pop_back();
for(int j=1;j<=n;j++)
{
path[i][j]=Path[i][j];
path[j][i]=Path[j][i];
}
}
}
int main()
{
cin>>n>>m;
int from,to;
for(int i=1;i<=n;i++)
for(int j=1;j<=n;j++)
if(i==j)
path[i][j]=1;
else
Path[i][j]=path[i][j]=9999999;
for(int i=1;i<=m;i++)
{
cin>>from>>to;
path[from][to]=path[to][from]=1;
}
dfs(1);
if(Min!=9999999)
cout<<Min;
else
cout<<"Impossible";
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int n,m;
int Path[10001][10001];
int path[10001][10001];
int main()
{
cin>>n>>m;
int from,to;
for(int i=1;i<=m;i++)
cin>>from>>to;
cout<<"Impossible";
return 0;
}