#include <fstream>
#include <algorithm>
#include <vector>
#include <stack>
#include <bitset>
using namespace std;
#define Nmax 100002
ifstream fin ( "ciclueuler.in" );
ofstream fout ( "ciclueuler.out" );
vector < int > G[Nmax];
stack < int > St, Cycle;
bitset < Nmax > Viz;
int N, M, Grade[Nmax];
void DFS( int node ){
Viz[node] = 1;
vector < int > :: iterator it;
for( it = G[node].begin(); it != G[node].end(); ++it )
if( !Viz[*it] )
DFS(*it);
}
bool Eulerian(){
for( int i = 1; i <= N; ++i )
if( Grade[i] & 1 )
return 0;
DFS(1);
if( Viz.count() < N )
return 0;
return 1;
}
inline void AddEdge( int x, int y ){
G[x].push_back(y);
G[y].push_back(x);
Grade[x]++;
Grade[y]++;
}
void RemoveEdge( int x, int y ){
vector < int > :: iterator it;
for ( it = G[x].begin(); it < G[x].end(); ++it ){
if ( *it == y ){
G[x].erase(it);
break;
}
}
for ( it = G[y].begin(); it < G[y].end(); ++it ){
if ( *it == x ){
G[y].erase(it);
break;
}
}
}
void Euler( int node ){
int aux;
vector < int > :: iterator it;
while ( !G[node].empty() ){
it = G[node].begin();
St.push( node );
aux = *it;
RemoveEdge( node, aux );
node = aux;
}
}
void Print(){
while ( !Cycle.empty() ){
fout << Cycle.top() << " ";
Cycle.pop();
}
}
int main(){
fin >> N >> M;
int x, y;
while( M-- ){
fin >> x >> y;
AddEdge(x,y);
}
if ( !Eulerian() ){
fout << -1;
return 0;
}
int node = 1;
do{
Euler( node );
node = St.top();
St.pop();
Cycle.push ( node );
}while ( !St.empty() );
Print();
return 0;
}