    #include <iostream>
    #include <sstream>
     #include <vector>

    using namespace std;
     vector<int> path;
vector<vector<int>> NtoN;
vector<int> minpath;


int rec(vector<int>& a,int b,int MAX){
  if(b == MAX)
  {
//      for(int i = 0; i < MAX + 1;i++)
//      cout << a[i] + 1 << " ";
//   cout << endl;
for(int i = 1; i < MAX+1;i++)
{
  int k = i;
  
for(int d = 0; d < minpath[i];d++)
{
  //cout << d << " " << a[k] << " " << k << endl;
  k = a[k];
}
  if(k != 0){
   return 0;
  }
}
        cout << "Yes" << endl;
    for(int i = 1; i < MAX + 1;i++)
      cout << a[i] + 1 << endl;
return 1;

  }
  
        b++;
  if(minpath[b] == 1)
  {
    auto c = a;
    c[b]= 0;
    int d = rec(c,b,MAX);
        if(d == 1)
      return 1;
  } else {
  for(int i = 0;i < path[b];i++)
    if(minpath[NtoN[b][i]] < minpath[b])
    {
    auto c = a;
    c[b] = NtoN[b][i];
   int d = rec(c,b,MAX) ;
    if(d == 1)
      return 1;
  }
  }
  return 0;
}
    int main(){
     
      int N,M;
      string buf;
      getline(cin,buf);
      {
      stringstream line(buf);
        line >> N >> M;
      }
      NtoN = vector(N,vector<int>(0,0));
      
      path = vector<int>(N,0);
      minpath = vector<int>(N,N);
minpath[0] = 0;

      
      for(int i = 0;i < M;i++)
      {
        getline(cin,buf);
        int a,b;
        stringstream line(buf);
        line >> a >> b;
        NtoN[a-1].push_back(b-1);
        NtoN[b-1].push_back(a-1);
        
        path[a-1]++;
        path[b-1]++;
      }
      
      
 auto nextto = vector<int>(1,0);
      for(int d = 1; d < N;d++)
      {
        auto tmp = nextto;
    nextto = vector<int>();
        for(auto &j: tmp)
        {
          for(auto &i : NtoN[j]){
if(minpath[i] > d){
         	nextto.push_back(i);
  	minpath[i] = d;
}
          }

        }
      } // end
      return 0;
    //  for(auto &i : minpath)
       // cout << i << endl;
      auto f = vector<int>(N,0);
     int d = rec(f,0,N-1);
      if(d == 0)
      cout << "No" << endl;
    }