{
TASK:platka
LANG:PASCAL
}
program platka;
var
{  f:text;}
  can:boolean;
  n,m,i,j,a,b,top1,top2,cur,save,total,num:longint;
  mas1,mas2:array[1..100000] of integer;
  graph:array[1..1500,1..1500] of boolean;
  added:array[1..1500,1..1500] of boolean;
  work:array[1..1500] of boolean;
begin
{   assign(f,'platka.in');
   reset(f);}
   readln({f,}n,m);
   a:=0;
   b:=0;
   num:=0;
   total:=0;
   for i:=1 to m do
   begin
    readln({f,}a,b);
    total:=total+1;
    graph[a,b]:=true;
    graph[b,a]:=true;
   end;
   top1:=1;
   top2:=0;
   mas1[top1]:=1;
   while true do
   begin
    if top1=0 then break;
    cur:=mas1[top1];
    can:=false;
    save:=0;
    for j:=1 to n do
     if (graph[cur,j]) and (not added[cur,j]) then
     begin
      work[cur]:=true;
      work[j]:=true;
      can:=true;
      save:=j;
      num:=num+1;
      added[cur,j]:=true;
      added[j,cur]:=true;
      break;
     end;
     if can=true then
     begin
      top1:=top1+1;
      mas1[top1]:=save;
     end
      else
     begin
      top2:=top2+1;
      mas2[top2]:=cur;
      top1:=top1-1;
     end;
   end;
   if num=total then
   begin
    for i:=top2 downto 1 do
     if i=1 then
      writeln(mas2[i])
       else
      write(mas2[i],' ');
   end
    else
   begin
    num:=0;
    for i:=1 to n do
     if not work[i] then
      num:=num+1;
    writeln('Sorry, Pesho ',num);
   end;
   readln
end.